guix-patches
[Top][All Lists]
Advanced

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

[bug#68857] [PATCH] gnu: home: dotfiles: Avoid creating extra directory


From: Giacomo Leidi
Subject: [bug#68857] [PATCH] gnu: home: dotfiles: Avoid creating extra directory in $HOME.
Date: Wed, 31 Jan 2024 23:17:48 +0100

This patch applies the fix from https://issues.guix.gnu.org/60521#43 ,
it is supposed to fix https://issues.guix.gnu.org/68848 .

* gnu/home/services/dotfiles.scm (import-dotfiles)[strip]: Drop extra
directory.

Change-Id: I98b747396e1fc8a8925204cde2bb705019ce2c1d
---
 gnu/home/services/dotfiles.scm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/gnu/home/services/dotfiles.scm b/gnu/home/services/dotfiles.scm
index 6a740c42ce..fc842f1fb3 100644
--- a/gnu/home/services/dotfiles.scm
+++ b/gnu/home/services/dotfiles.scm
@@ -58,7 +58,11 @@ (define (import-dotfiles directory files)
 generated by recursively visiting DIRECTORY and mapping its contents to the
 user's home directory, excluding files that match any of the patterns in 
EXCLUDED."
   (define (strip file)
-    (string-drop file (+ 1 (string-length directory))))
+    (string-join
+     (cdr
+      (string-split (string-drop file (+ 1 (string-length directory)))
+                    #\/))
+     "/"))
 
   (define (format file)
     ;; Remove from FILE characters that cannot be used in the store.

base-commit: bf7991a8c767abd32cfb2c92e3d57665a7cabf00
-- 
2.41.0






reply via email to

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