aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-03-27 12:36:14 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-03-27 14:29:20 -0700
commit12c74be550c22d7d7ea57d3fa6645af1d2a9ad6c (patch)
tree877b0cf5b76d234c4e8d51c360fb09b5216caaf2
parent7e636cec14ff587d0afeadafbcc4384a6de366d9 (diff)
downloadconsfigurator-12c74be550c22d7d7ea57d3fa6645af1d2a9ad6c.tar.gz
use PATHNAME-FILE instead of PATHNAME-NAME
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
-rw-r--r--src/data.lisp4
-rw-r--r--src/package.lisp2
-rw-r--r--src/util.lisp5
3 files changed, 9 insertions, 2 deletions
diff --git a/src/data.lisp b/src/data.lisp
index 5863784..91e6738 100644
--- a/src/data.lisp
+++ b/src/data.lisp
@@ -251,7 +251,7 @@ This is not allowed for security reasons."))
(let* ((*connection* connection)
(dest (remote-data-pathname iden1 iden2 data-version))
(destdir (pathname-directory-pathname dest))
- (destfile (pathname-name dest)))
+ (destfile (pathname-file dest)))
(mrun "mkdir" "-p" destdir)
(with-remote-current-directory (destdir)
(etypecase data
@@ -373,7 +373,7 @@ process, where each entry is of the form
(pathname-directory dir))
(lastcar
(pathname-directory subdir))
- (pathname-name file)))))))
+ (pathname-file file)))))))
(defun get-highest-local-cached-prerequisite-data (iden1 iden2)
"Get the highest version of prerequisite data identified by IDEN1 and IDEN2
diff --git a/src/package.lisp b/src/package.lisp
index f26de23..6c3a167 100644
--- a/src/package.lisp
+++ b/src/package.lisp
@@ -20,6 +20,7 @@
#:with-temporary-file
#:ensure-directory-pathname
#:ensure-pathname
+ #:enough-pathname
#:getenv
#:subdirectories
#:directory-files
@@ -44,6 +45,7 @@
#:with-temporary-file
#:ensure-directory-pathname
#:ensure-pathname
+ #:enough-pathname
#:getenv
#:subdirectories
#:directory-files
diff --git a/src/util.lisp b/src/util.lisp
index 4df14a6..ab41664 100644
--- a/src/util.lisp
+++ b/src/util.lisp
@@ -142,6 +142,11 @@ one solution is to convert your property to a :LISP property."
(unwind-protect (progn ,@forms)
(delete-directory-tree ,dir :validate t))))
+(defun pathname-file (pathname)
+ "Like PATHNAME-NAME but include any file extension."
+ (namestring
+ (enough-pathname pathname (pathname-directory-pathname pathname))))
+
;;;; Progress & debug printing