aboutsummaryrefslogtreecommitdiff
path: root/src/util.lisp
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-06-25 14:20:58 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-06-25 16:10:57 -0700
commit405f2636022e49a8789dadd9a413a62e07bd4a72 (patch)
tree264644c934896f30c060257ad883a9babd2f7cdd /src/util.lisp
parentf3687fa69e3069eee9feaf2743c501df0322480f (diff)
downloadconsfigurator-405f2636022e49a8789dadd9a413a62e07bd4a72.tar.gz
attempt to fix PATHNAME-FILE for pathnames with no directory
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/util.lisp')
-rw-r--r--src/util.lisp4
1 files changed, 3 insertions, 1 deletions
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 "/")