From 102214763c91bb4b4f75bccd28f0e481f5eed8f8 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sat, 10 Jul 2021 18:56:45 -0700 Subject: INSTALLER:CLEANLY-INSTALLED-ONCE: error when new-os DEST exists This should not happen. Signed-off-by: Sean Whitton --- src/property/installer.lisp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/property/installer.lisp') diff --git a/src/property/installer.lisp b/src/property/installer.lisp index 097caef..72119a0 100644 --- a/src/property/installer.lisp +++ b/src/property/installer.lisp @@ -244,9 +244,10 @@ using a combinator like ON-CHANGE, or applied manually with DEPLOY-THESE." (rename file (chroot-pathname file old-os)))) (dolist (file (directory-contents new-os)) (let ((dest (in-chroot-pathname file new-os))) - (unless (or (preservedp dest) - (file-exists-p dest) - (directory-exists-p dest)) + (unless (preservedp dest) + (when (or (file-exists-p dest) (directory-exists-p dest)) + (failed-change + "~A already exists in root directory." dest)) (rename file dest))))) (serious-condition (c) ;; Make a single attempt to undo the moves to increase the chance -- cgit v1.2.3