guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/02: utils: 'copy-recursively' keeps symlink mtime when #:keep-mtime?


From: guix-commits
Subject: 02/02: utils: 'copy-recursively' keeps symlink mtime when #:keep-mtime? is true.
Date: Sun, 13 Dec 2020 16:48:21 -0500 (EST)

civodul pushed a commit to branch core-updates
in repository guix.

commit cc6cb6e80a42355147809b4830053a34d1563994
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Fri Dec 11 15:03:23 2020 +0100

    utils: 'copy-recursively' keeps symlink mtime when #:keep-mtime? is true.
    
    * guix/build/utils.scm (copy-recursively): In the "leaf" procedure, call
    'set-file-time' also on symlinks.
---
 guix/build/utils.scm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/guix/build/utils.scm b/guix/build/utils.scm
index 9965106..f0ea830 100644
--- a/guix/build/utils.scm
+++ b/guix/build/utils.scm
@@ -366,10 +366,10 @@ permissions.  Write verbose output to the LOG port."
                              (symlink target dest)))
                           (else
                            (copy-file file dest)
-                           (when keep-mtime?
-                             (set-file-time dest stat))
                            (when keep-permissions?
-                             (chmod dest (stat:perms stat)))))))
+                             (chmod dest (stat:perms stat)))))
+                        (when keep-mtime?
+                          (set-file-time dest stat))))
                     (lambda (dir stat result)     ; down
                       (let ((target (string-append destination
                                                    (strip-source dir))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]