aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-05-20 23:02:28 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-05-20 23:02:28 -0700
commitb9cb1eafb5b5ad4b081730ee7e5f05687b126e45 (patch)
tree8df9d2f7bb5033e874b3c2ab3edf69b05ff6d281
parent23b372b7a38c1f9ac761b7d5550008f42844600f (diff)
downloadconsfigurator-b9cb1eafb5b5ad4b081730ee7e5f05687b126e45.tar.gz
PATHNAME-FILE: return nil when PATHNAME-NAME returns nil
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
-rw-r--r--src/util.lisp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/util.lisp b/src/util.lisp
index c8dc04c..1feb97a 100644
--- a/src/util.lisp
+++ b/src/util.lisp
@@ -140,8 +140,9 @@ one solution is to convert your property to a :LISP property."
(defun pathname-file (pathname)
"Like PATHNAME-NAME but include any file extension."
- (namestring
- (enough-pathname pathname (pathname-directory-pathname pathname))))
+ (and (pathname-name pathname)
+ (namestring
+ (enough-pathname pathname (pathname-directory-pathname pathname)))))
(defun drop-trailing-slash (namestring)
(if (string-suffix-p namestring "/")