fix: Prefer install.wim in extracted media (#2073)

This commit is contained in:
Kroese
2026-08-06 12:38:26 +02:00
committed by GitHub
parent 4f70ba9e89
commit d8cb4816f6
+5 -2
View File
@@ -1187,7 +1187,7 @@ parseWimHeader() {
findImage() { findImage() {
local dir="$1" local dir="$1"
local sources result local name sources result
sources=$(find "$dir" -maxdepth 1 -type d -iname sources -print -quit) || return 1 sources=$(find "$dir" -maxdepth 1 -type d -iname sources -print -quit) || return 1
@@ -1196,7 +1196,10 @@ findImage() {
return 1 return 1
fi fi
result=$(find "$sources" -maxdepth 1 -type f \( -iname install.wim -or -iname install.esd \) -print -quit) || return 1 for name in install.wim install.esd; do
result=$(find "$sources" -maxdepth 1 -type f -iname "$name" -print -quit) || return 1
[ -n "$result" ] && break
done
if [ ! -f "$result" ]; then if [ ! -f "$result" ]; then
warn "failed to locate 'install.wim' or 'install.esd' in ISO image, $FB" warn "failed to locate 'install.wim' or 'install.esd' in ISO image, $FB"