Compare commits

..

No commits in common. "4d0d41ca7b0101eb1aec1283e170ab400e3c0e8d" and "52c74d4c09bc706ec5c3b1a24bb02298709cf91f" have entirely different histories.

View File

@ -11,18 +11,8 @@ sourceBackupLocations()
dir=$(backupLocationsDir)
[[ ! -d "$dir" ]] && return 0
# configs/backup/locations/ lives in the manager-owned configs tree (not
# the dockerinstall-owned containers tree), so a plain find works fine.
# runFileOp was adding ~50 ms of sudo-shell overhead per invocation for
# no benefit. Fall back to runFileOp only if the directory isn't readable
# for some reason (relocated tree, custom permissions, …).
local find_cmd=(find)
if [[ ! -r "$dir" || ! -x "$dir" ]] && declare -f runFileOp >/dev/null 2>&1; then
find_cmd=(runFileOp find)
fi
local cfg
while IFS= read -r -d '' cfg; do
[[ -f "$cfg" ]] && source "$cfg"
done < <("${find_cmd[@]}" "$dir" -mindepth 2 -maxdepth 2 -name location.config -type f -print0 2>/dev/null)
done < <(runFileOp find "$dir" -mindepth 2 -maxdepth 2 -name location.config -type f -print0 2>/dev/null)
}