aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnu/build/activation.scm4
1 files changed, 3 insertions, 1 deletions
diff --git a/gnu/build/activation.scm b/gnu/build/activation.scm
index d1a2876a96..a450578c24 100644
--- a/gnu/build/activation.scm
+++ b/gnu/build/activation.scm
@@ -113,7 +113,9 @@ and bits are set according to the default behaviour of 'mkdir'."
;; If not, create it.
(catch 'system-error
(lambda _
- (mkdirat root head))
+ (if (null? tail)
+ (mkdirat root head bits)
+ (mkdirat root head)))
(lambda args
;; Someone else created the directory. Unexpected but fine.
(unless (= EEXIST (system-error-errno args))