From b997d43214445462f23947afbbcadf24c6018217 Mon Sep 17 00:00:00 2001 From: Alex Sassmannshausen Date: Mon, 8 Apr 2019 15:18:23 +0100 Subject: [PATCH] utils: Handle #f file-name. * guix/utils.scm (current-source-directory): Change dispatch to handle #f file-name. Signed-off-by: Maxim Cournoyer --- guix/utils.scm | 12 +++++------- 1 file 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.