Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Fix the logic of timefail inverted by accident
Baptiste Daroussin committed 9 years ago
commit 7aea994e5bca2eb678327b6a7e74e5d775420622
parent 59f5902
1 file changed +2 -2
modified libpkg/pkg_add.c
@@ -193,7 +193,7 @@ set_attrs(int fd, char *path, mode_t perm, uid_t uid, gid_t gid,
	times[0] = *ats;
	times[1] = *mts;
	if (utimensat(fd, RELATIVE_PATH(path), times,
-
	    AT_SYMLINK_NOFOLLOW) == -1 && !timefail){
+
	    AT_SYMLINK_NOFOLLOW) == -1 && timefail){
		pkg_emit_error("Fail to set time on %s: %s", path,
		    strerror(errno));
		return (EPKG_FATAL);
@@ -210,7 +210,7 @@ set_attrs(int fd, char *path, mode_t perm, uid_t uid, gid_t gid,
	if (getcwd(saved_cwd, sizeof(saved_cwd)) == NULL)
		saved_cwd[0] = '\0';
	fchdir(fd);
-
	if (lutimes(RELATIVE_PATH(path), &tv) == -1 && !timefail) {
+
	if (lutimes(RELATIVE_PATH(path), &tv) == -1 && timefail) {
		pkg_emit_error("Fail to set time on %s: %s", path,
		    strerror(errno));
		return (EPKG_FATAL);