From dbc873ecfd59f172be3012f64dcf538034f6f5c0 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Thu, 20 May 2021 23:13:32 -0700 Subject: 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 --- src/property/file.lisp | 10 ++++------ 1 file 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 -- cgit v1.2.3