summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--guix/utils.scm12
1 files changed, 5 insertions, 7 deletions
diff --git a/guix/utils.scm b/guix/utils.scm
index 1f99c5b3f5..64853f2989 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -782,13 +782,11 @@ be determined."
           ;; the absolute file name by looking at %LOAD-PATH; doing this at
           ;; run time rather than expansion time is necessary to allow files
           ;; to be moved on the file system.
-          (cond ((not file-name)
-                 #f)                ;raising an error would upset Geiser users
-                ((string-prefix? "/" file-name)
-                 (dirname file-name))
-                (else
-                 #`(absolute-dirname #,file-name))))
-         (#f
+          (if (string-prefix? "/" file-name)
+              (dirname file-name)
+              #`(absolute-dirname #,file-name)))
+         ((or ('filename . #f) #f)
+          ;; raising an error would upset Geiser users
           #f))))))
 
 ;; A source location.