From 405f2636022e49a8789dadd9a413a62e07bd4a72 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Fri, 25 Jun 2021 14:20:58 -0700 Subject: attempt to fix PATHNAME-FILE for pathnames with no directory Signed-off-by: Sean Whitton --- src/util.lisp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/util.lisp') diff --git a/src/util.lisp b/src/util.lisp index 1dd2b44..2442927 100644 --- a/src/util.lisp +++ b/src/util.lisp @@ -165,7 +165,9 @@ one solution is to convert your property to a :LISP property." "Like PATHNAME-NAME but include any file extension." (and (pathname-name pathname) (namestring - (enough-pathname pathname (pathname-directory-pathname pathname))))) + (if (pathname-directory pathname) + (enough-pathname pathname (pathname-directory-pathname pathname)) + pathname)))) (defun ensure-trailing-slash (namestring) (if (string-suffix-p namestring "/") -- cgit v1.2.3