diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2021-02-26 22:54:11 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2021-02-27 13:39:52 -0700 |
commit | db2879636b809e34efc9397c19b646a2695beb51 (patch) | |
tree | 5ea4300b201553e34d845af7870deb4da23cda2f /src/property/file.lisp | |
parent | 2e1599f51c803560b6b9063fd8ae95d62a601b62 (diff) | |
download | consfigurator-db2879636b809e34efc9397c19b646a2695beb51.tar.gz |
attempt to implement umask support for CONNECTION-WRITEFILE
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/property/file.lisp')
-rw-r--r-- | src/property/file.lisp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/property/file.lisp b/src/property/file.lisp index ace5ec3..9ef9765 100644 --- a/src/property/file.lisp +++ b/src/property/file.lisp @@ -26,7 +26,7 @@ point in doing that here because WRITEFILE is synchronous." (new-lines (funcall function orig-lines))) (if (equal orig-lines new-lines) :no-change - (writefile :try-preserve file (unlines new-lines))))) + (writefile file (unlines new-lines) :try-preserve t)))) (defprop has-content :posix (path lines) "Ensure there is a file at PATH whose lines are the elements of LINES." @@ -39,7 +39,8 @@ point in doing that here because WRITEFILE is synchronous." (existing-lines (lines (readfile path)))) (dolist (existing-line existing-lines) (deletef new-lines existing-line :test #'string=)) - (writefile path (unlines (nconc existing-lines new-lines)))))) + (writefile path (unlines (nconc existing-lines new-lines)) + :try-preserve t)))) (defprop data-uploaded :posix (iden1 iden2 destination) (:hostattrs |