guix-commits
[Top][All Lists]
Advanced

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

03/05: gnu: papirus-icon-theme: Recursively resolve symlinks.


From: guix-commits
Subject: 03/05: gnu: papirus-icon-theme: Recursively resolve symlinks.
Date: Wed, 15 Feb 2023 05:46:29 -0500 (EST)

nckx pushed a commit to branch master
in repository guix.

commit 016eab3e29263045b1422289b7ec9382edc725f9
Author: Tobias Geerinckx-Rice <me@tobias.gr>
AuthorDate: Sun Jan 29 01:00:00 2023 +0100

    gnu: papirus-icon-theme: Recursively resolve symlinks.
    
    This follows up on commit aed385e18ec7b68a0bc1bb4b173aeadc9cd97245.
    
    * gnu/packages/gnome-xyz.scm (papirus-icon-theme)[arguments]: Replace
    READLINK with CANONICALIZE-PATH to resolve symlink chains.
---
 gnu/packages/gnome-xyz.scm | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/gnome-xyz.scm b/gnu/packages/gnome-xyz.scm
index 0cb4adac76..e1d0e5ec07 100644
--- a/gnu/packages/gnome-xyz.scm
+++ b/gnu/packages/gnome-xyz.scm
@@ -227,11 +227,10 @@ simple and consistent.")
                    (symlink? (lambda (_ stat)
                                (eq? 'symlink (stat:type stat)))))
                (for-each (lambda (file)
-                           (with-directory-excursion (dirname file)
-                             (let ((target (readlink file)))
-                               (when (eq? 'regular (stat:type (stat target)))
-                                 (delete-file file)
-                                 (link target file)))))
+                           (let ((target (canonicalize-path file)))
+                             (when (eq? 'regular (stat:type (stat target)))
+                               (delete-file file)
+                               (link target file))))
                          (find-files out symlink?))))))))
     (native-inputs
      (list `(,gtk+ "bin")))



reply via email to

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