mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
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
This commit is contained in:
parent
c74401749a
commit
56395b12f6
1 changed files with 2 additions and 1 deletions
|
@ -347,7 +347,8 @@ (define (destination file)
|
||||||
(define (rewrite-leaf file)
|
(define (rewrite-leaf file)
|
||||||
(let ((stat (lstat file))
|
(let ((stat (lstat file))
|
||||||
(dest (destination file)))
|
(dest (destination file)))
|
||||||
(mkdir-p (dirname dest))
|
(unless (file-exists? (dirname dest))
|
||||||
|
(mkdir-p (dirname dest)))
|
||||||
(case (stat:type stat)
|
(case (stat:type stat)
|
||||||
((symlink)
|
((symlink)
|
||||||
(let ((target (readlink file)))
|
(let ((target (readlink file)))
|
||||||
|
|
Loading…
Reference in a new issue