summaryrefslogtreecommitdiff
path: root/guix/store/database.scm
diff options
context:
space:
mode:
Diffstat (limited to 'guix/store/database.scm')
-rw-r--r--guix/store/database.scm10
1 files changed, 5 insertions, 5 deletions
diff --git a/guix/store/database.scm b/guix/store/database.scm
index 05b2ba6c3f..0879a95d0b 100644
--- a/guix/store/database.scm
+++ b/guix/store/database.scm
@@ -190,12 +190,14 @@ Every store item in REFERENCES must already be registered."
(define (reset-timestamps file)
"Reset the modification time on FILE and on all the files it contains, if
it's a directory. While at it, canonicalize file permissions."
+ ;; Note: We're resetting to one second after the Epoch like 'guix-daemon'
+ ;; has always done.
(let loop ((file file)
(type (stat:type (lstat file))))
(case type
((directory)
(chmod file #o555)
- (utime file 0 0 0 0)
+ (utime file 1 1 0 0)
(let ((parent file))
(for-each (match-lambda
(("." . _) #f)
@@ -209,12 +211,10 @@ it's a directory. While at it, canonicalize file permissions."
(type type))))))
(scandir* parent))))
((symlink)
- ;; FIXME: Implement bindings for 'futime' to reset the timestamps on
- ;; symlinks.
- #f)
+ (utime file 1 1 0 0 AT_SYMLINK_NOFOLLOW))
(else
(chmod file (if (executable-file? file) #o555 #o444))
- (utime file 0 0 0 0)))))
+ (utime file 1 1 0 0)))))
(define* (register-path path
#:key (references '()) deriver prefix