Radish alpha
H
HardenedBSD Package Manager
Radicle
Git (anonymous pull)
Log in to clone via SSH
Fix the logic of timefail inverted by accident
Baptiste Daroussin committed 10 years ago
commit 7aea994e5bca2eb678327b6a7e74e5d775420622
parent 59f5902e3b6d16ace56423d5e56684b15d8e0c74
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);