aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-04-01 12:33:11 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-04-01 12:33:11 -0700
commit78bccabe37eb1930c0fca315e5c8907fad06c3f1 (patch)
treebdc4ba8cc687797198ff394b3420cc81f45d07de
parent950537a84207067d2823dcec55916c2d65eb7de0 (diff)
downloadconsfigurator-78bccabe37eb1930c0fca315e5c8907fad06c3f1.tar.gz
FILE:MAP-FILE-LINES: cope with non-existent file
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
-rw-r--r--src/property/file.lisp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/property/file.lisp b/src/property/file.lisp
index 394f761..58c3a03 100644
--- a/src/property/file.lisp
+++ b/src/property/file.lisp
@@ -23,7 +23,7 @@
For efficiency, a :LISP property might want to use streams, but there's no
point in doing that here because WRITEFILE is synchronous."
- (let* ((orig-lines (lines (readfile file)))
+ (let* ((orig-lines (and (remote-exists-p file) (lines (readfile file))))
(new-lines (funcall function orig-lines)))
(if (equal orig-lines new-lines)
:no-change