database: 'reset-timestamps' now correctly handles symlinks.

* guix/store/database.scm (reset-timestamps): Use 'utime' with
AT_SYMLINK_NOFOLLOW for symlinks.
This commit is contained in:
Ludovic Courtès 2018-07-03 11:02:22 +02:00
parent 25c7ff6a3e
commit e5e5119855
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 1 additions and 3 deletions

View File

@ -209,9 +209,7 @@ 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 0 0 0 0 AT_SYMLINK_NOFOLLOW))
(else
(chmod file (if (executable-file? file) #o555 #o444))
(utime file 0 0 0 0)))))