mirror of
https://github.com/dockur/windows.git
synced 2026-08-03 20:47:12 +01: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" ;;
|
"czech" | "cz" | "cesky" ) LANGUAGE="cs" ;;
|
||||||
"danish" | "dk" | "danske" ) LANGUAGE="da" ;;
|
"danish" | "dk" | "danske" ) LANGUAGE="da" ;;
|
||||||
"dutch" | "nederlands" ) LANGUAGE="nl" ;;
|
"dutch" | "nederlands" ) LANGUAGE="nl" ;;
|
||||||
"english" | "gb" | "british" ) LANGUAGE="en" ;;
|
"english" ) LANGUAGE="en" ;;
|
||||||
"estonian" | "eesti" ) LANGUAGE="et" ;;
|
"british" | "gb" ) LANGUAGE="en-gb" ;; "estonian" | "eesti" ) LANGUAGE="et" ;;
|
||||||
"finnish" | "suomi" ) LANGUAGE="fi" ;;
|
"finnish" | "suomi" ) LANGUAGE="fi" ;;
|
||||||
"french" | "français" | "francais" ) LANGUAGE="fr" ;;
|
"french" | "français" | "francais" ) LANGUAGE="fr" ;;
|
||||||
"german" | "deutsch" ) LANGUAGE="de" ;;
|
"german" | "deutsch" ) LANGUAGE="de" ;;
|
||||||
|
|||||||
+8
-1
@@ -11,7 +11,7 @@ backup () {
|
|||||||
local count=1
|
local count=1
|
||||||
local name="unknown"
|
local name="unknown"
|
||||||
local root="$STORAGE/backups"
|
local root="$STORAGE/backups"
|
||||||
local file previous failed=""
|
local file previous find_pid failed=""
|
||||||
|
|
||||||
previous=$(readState "base") || return 1
|
previous=$(readState "base") || return 1
|
||||||
[ -n "$previous" ] && name="${previous%.*}"
|
[ -n "$previous" ] && name="${previous%.*}"
|
||||||
@@ -53,6 +53,13 @@ backup () {
|
|||||||
-not -iname '*.iso' -print0
|
-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 "$dir")" ] && rm -rf "$dir"
|
||||||
[ -z "$(ls -A "$root")" ] && rm -rf "$root"
|
[ -z "$(ls -A "$root")" ] && rm -rf "$root"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user