feat: Check path to custom .xml

This commit is contained in:
Kroese 2025-02-28 03:39:43 +01:00 committed by GitHub
parent 9bbe8f22c8
commit 4c94dfcb0a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -491,6 +491,10 @@ setXML() {
local file="/custom.xml"
if [ -d "$file" ]; then
warn "The file $file has an invalid path!"
fi
[ ! -f "$file" ] || [ ! -s "$file" ] && file="$STORAGE/custom.xml"
[ ! -f "$file" ] || [ ! -s "$file" ] && file="/run/assets/custom.xml"
[ ! -f "$file" ] || [ ! -s "$file" ] && file="$1"