me
/
guix
Archived
1
0
Fork 0

graft: Only create directory when needed.

* guix/build/graft.scm (rewrite-directory)[rewrite-leaf]: Only create
the parent directories when they don't already exist.

Change-Id: I802aac4d6090ed07effddde3eb3195f64aca31d3
master
Efraim Flashner 2024-07-23 20:21:11 +03:00
parent c74401749a
commit 56395b12f6
No known key found for this signature in database
GPG Key ID: 41AAE7DCCA3D8351
1 changed files with 2 additions and 1 deletions

View File

@ -347,7 +347,8 @@ file name pairs."
(define (rewrite-leaf file)
(let ((stat (lstat file))
(dest (destination file)))
(mkdir-p (dirname dest))
(unless (file-exists? (dirname dest))
(mkdir-p (dirname dest)))
(case (stat:type stat)
((symlink)
(let ((target (readlink file)))