aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-05-20 23:13:32 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-05-20 23:13:32 -0700
commitdbc873ecfd59f172be3012f64dcf538034f6f5c0 (patch)
tree10a237a8ef030aeb8e26c5bb08efaf1a8bcd8792
parentce167652a1839426a786cc35c4cc85948fee2a02 (diff)
downloadconsfigurator-dbc873ecfd59f172be3012f64dcf538034f6f5c0.tar.gz
FILE:{DATA,SECRET}-UPLOADED: use CONTAINING-DIRECTORY-EXISTS
This handles the case of a relative path to a file right inside HOME. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
-rw-r--r--src/property/file.lisp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/property/file.lisp b/src/property/file.lisp
index 7418855..0cae1c1 100644
--- a/src/property/file.lisp
+++ b/src/property/file.lisp
@@ -81,9 +81,8 @@ CONTENT can be a list of lines or a single string."
(declare (ignore destination))
(require-data iden1 iden2))
(:apply
- (let ((destination (ensure-pathname destination :namestring :unix)))
- (directory-exists (pathname-directory-pathname destination))
- (maybe-writefile-data destination iden1 iden2))))
+ (containing-directory-exists destination)
+ (maybe-writefile-data destination iden1 iden2)))
(defprop host-data-uploaded :posix (destination)
(:hostattrs
@@ -96,9 +95,8 @@ CONTENT can be a list of lines or a single string."
(declare (ignore destination))
(require-data iden1 iden2))
(:apply
- (let ((destination (ensure-pathname destination :namestring :unix)))
- (directory-exists (pathname-directory-pathname destination))
- (maybe-writefile-data destination iden1 iden2 :mode #o600))))
+ (containing-directory-exists destination)
+ (maybe-writefile-data destination iden1 iden2 :mode #o600)))
(defprop host-secret-uploaded :posix (destination)
(:hostattrs