feat: Propagate backup file enumeration failures (#1933)

This commit is contained in:
Kroese
2026-07-21 21:01:58 +02:00
committed by GitHub
parent c2f73db036
commit b10e4d7fdc
2 changed files with 10 additions and 3 deletions
+8 -1
View File
@@ -11,7 +11,7 @@ backup () {
local count=1
local name="unknown"
local root="$STORAGE/backups"
local file previous failed=""
local file previous find_pid failed=""
previous=$(readState "base") || return 1
[ -n "$previous" ] && name="${previous%.*}"
@@ -53,6 +53,13 @@ backup () {
-not -iname '*.iso' -print0
)
find_pid=$!
if ! wait "$find_pid"; then
error "Failed to enumerate files in \"$STORAGE\"."
failed="Y"
fi
[ -z "$(ls -A "$dir")" ] && rm -rf "$dir"
[ -z "$(ls -A "$root")" ] && rm -rf "$root"