summaryrefslogtreecommitdiff
path: root/guix/build/profiles.scm
diff options
context:
space:
mode:
Diffstat (limited to 'guix/build/profiles.scm')
-rw-r--r--guix/build/profiles.scm4
1 files changed, 3 insertions, 1 deletions
diff --git a/guix/build/profiles.scm b/guix/build/profiles.scm
index 525d59b979..2becc6b9af 100644
--- a/guix/build/profiles.scm
+++ b/guix/build/profiles.scm
@@ -94,7 +94,9 @@ symlink (to a read-only directory in the store), then delete the symlink and
instead make DIRECTORY a \"real\" directory containing symlinks."
(define (unsymlink link)
(let* ((target (readlink link))
- (files (scandir target
+ ;; TARGET might itself be a symlink, so append "/" to make sure
+ ;; 'scandir' enters it.
+ (files (scandir (string-append target "/")
(negate (cut member <> '("." ".."))))))
(delete-file link)
(mkdir link)