utils: Handle #f file-name.
* guix/utils.scm (current-source-directory): Change dispatch to handle #f file-name. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
This commit is contained in:
parent
9c9982dc0c
commit
b997d43214
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user