From b9cb1eafb5b5ad4b081730ee7e5f05687b126e45 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Thu, 20 May 2021 23:02:28 -0700 Subject: PATHNAME-FILE: return nil when PATHNAME-NAME returns nil Signed-off-by: Sean Whitton --- src/util.lisp | 5 +++-- 1 file 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 "/") -- cgit v1.2.3