guix-commits
[Top][All Lists]
Advanced

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

01/04: utils: 'copy-recursively' keeps directory mtime when #:keep-mtime


From: guix-commits
Subject: 01/04: utils: 'copy-recursively' keeps directory mtime when #:keep-mtime? is true.
Date: Thu, 19 Nov 2020 16:37:04 -0500 (EST)

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

commit 201cbcac3e9c23cc28352fa9ece3e677e22cc12c
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Thu Nov 19 18:08:42 2020 +0100

    utils: 'copy-recursively' keeps directory mtime when #:keep-mtime? is true.
    
    Fixes <https://bugs.gnu.org/44741>.
    
    * guix/build/utils.scm (copy-recursively): Move 'set-file-time' call
    from 'down' to 'up'.
---
 guix/build/utils.scm | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/guix/build/utils.scm b/guix/build/utils.scm
index bf57564..443a820 100644
--- a/guix/build/utils.scm
+++ b/guix/build/utils.scm
@@ -369,11 +369,12 @@ verbose output to the LOG port."
                     (lambda (dir stat result)     ; down
                       (let ((target (string-append destination
                                                    (strip-source dir))))
-                        (mkdir-p target)
-                        (when keep-mtime?
-                          (set-file-time target stat))))
+                        (mkdir-p target)))
                     (lambda (dir stat result)     ; up
-                      result)
+                      (when keep-mtime?
+                        (let ((target (string-append destination
+                                                     (strip-source dir))))
+                          (set-file-time target stat))))
                     (const #t)                    ; skip
                     (lambda (file stat errno result)
                       (format (current-error-port) "i/o error: ~a: ~a~%"



reply via email to

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