guix-commits
[Top][All Lists]
Advanced

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

01/04: challenge: When using '--diff', do not attempt to chmod symlinks.


From: guix-commits
Subject: 01/04: challenge: When using '--diff', do not attempt to chmod symlinks.
Date: Wed, 15 Jun 2022 17:50:34 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit 5d4b18912048b67c144bc56a7bedc8252cbeb932
Author: Ludovic Court├Ęs <ludo@gnu.org>
AuthorDate: Wed Jun 15 11:02:54 2022 +0200

    challenge: When using '--diff', do not attempt to chmod symlinks.
    
    This is a followup to 2a2856d5ccd9a9b7df8a94333a277b971a39b150.
    
    * guix/scripts/challenge.scm (make-directory-writable): Do not call
    'make-file-writable' on symlinks.
---
 guix/scripts/challenge.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/guix/scripts/challenge.scm b/guix/scripts/challenge.scm
index 72d3e850f2..96ffe53a85 100644
--- a/guix/scripts/challenge.scm
+++ b/guix/scripts/challenge.scm
@@ -316,7 +316,8 @@ specified in COMPARISON-REPORT."
 'chmod -R +w DIRECTORY'."
   (file-system-fold (const #t)
                     (lambda (file stat _)         ;leaf
-                      (make-file-writable file))
+                      (unless (eq? 'symlink (stat:type stat))
+                        (make-file-writable file)))
                     (lambda (directory stat _)    ;down
                       (make-file-writable directory))
                     (const #t)                    ;up



reply via email to

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