mirror of
https://github.com/dockur/windows.git
synced 2026-07-27 21:42:36 +07:00
feat: Propagate backup file enumeration failures (#1933)
This commit is contained in:
+2
-2
@@ -379,8 +379,8 @@ parseLanguage() {
|
||||
"czech" | "cz" | "cesky" ) LANGUAGE="cs" ;;
|
||||
"danish" | "dk" | "danske" ) LANGUAGE="da" ;;
|
||||
"dutch" | "nederlands" ) LANGUAGE="nl" ;;
|
||||
"english" | "gb" | "british" ) LANGUAGE="en" ;;
|
||||
"estonian" | "eesti" ) LANGUAGE="et" ;;
|
||||
"english" ) LANGUAGE="en" ;;
|
||||
"british" | "gb" ) LANGUAGE="en-gb" ;; "estonian" | "eesti" ) LANGUAGE="et" ;;
|
||||
"finnish" | "suomi" ) LANGUAGE="fi" ;;
|
||||
"french" | "français" | "francais" ) LANGUAGE="fr" ;;
|
||||
"german" | "deutsch" ) LANGUAGE="de" ;;
|
||||
|
||||
+8
-1
@@ -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"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user