Fix bash syntax error in backup_folder return logic
All checks were successful
Check scripts syntax / check-scripts-syntax (push) Successful in 31s

The arithmetic test `(( rc == 0 || (rc == 1 && -z "$filtered_output") ))`
breaks the bash parser when filtered_output is a multiline string. Split
the test so the -z check runs in a [[ ]] context instead.
This commit is contained in:
2026-06-27 12:39:14 -03:00
parent 2ce71f4fc1
commit 8f701dc5c8

View File

@@ -415,7 +415,9 @@ backup_folder() {
if [[ -n "$filtered_output" ]]; then
log_warn "7z output for '${folder_path}': ${filtered_output}"
fi
if (( rc == 0 || (rc == 1 && -z "$filtered_output") )); then
if (( rc == 0 )); then
return 0
elif (( rc == 1 )) && [[ -z "$filtered_output" ]]; then
return 0
fi
return 1