feat: Check path to boot.iso

This commit is contained in:
Kroese 2025-02-27 19:23:32 +01:00 committed by GitHub
parent 03115137c8
commit 18a06474e4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -168,6 +168,10 @@ findFile() {
local ext="$1"
local file
if [ -d "/boot.$ext" ]; then
warn "The file /boot.$ext has an invalid path!"
fi
file=$(find / -maxdepth 1 -type f -iname "boot.$ext" | head -n 1)
[ ! -s "$file" ] && file=$(find "$STORAGE" -maxdepth 1 -type f -iname "boot.$ext" | head -n 1)
detectType "$file" && return 0