GNU bug report logs -
#76204
[PATCH] system: skeleton-directory: Allow copying into subdirectories.
Previous Next
To reply to this bug, email your comments to 76204 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#76204
; Package
guix-patches
.
(Tue, 11 Feb 2025 14:19:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Sughosha <sughosha <at> disroot.org>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Tue, 11 Feb 2025 14:19:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
This fixes the error while copying the source to the target that is supposed to
go into subdirectories that are not present yet.
* gnu/shadow.scm (skeleton-directory): Create the parent directories of the
target if not present before copying the source.
Change-Id: I91e669968107d3d2b299b61b24ac1cc1895ebf76
---
gnu/system/shadow.scm | 3 +++
1 file changed, 3 insertions(+)
diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm
index 48eca2564f..c68d8306fa 100644
--- a/gnu/system/shadow.scm
+++ b/gnu/system/shadow.scm
@@ -320,6 +320,9 @@ (define (skeleton-directory skeletons)
;; would just copy the symlinks as is.
(for-each (match-lambda
((target source)
+ (when (not (directory-exists?
+ (dirname target)))
+ (mkdir-p (dirname target)))
(copy-recursively source target)))
'#$skeletons)
;; Make nanorc respect XDG_CONFIG_HOME.
base-commit: 555937448cc510517011035fbf39c3687336759d
--
2.47.1
This bug report was last modified 56 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.