From d8cb4816f6c9e173ae4f6d505485ae4bdb61c58a Mon Sep 17 00:00:00 2001 From: Kroese Date: Thu, 6 Aug 2026 12:38:26 +0200 Subject: [PATCH] fix: Prefer install.wim in extracted media (#2073) --- src/image.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/image.sh b/src/image.sh index 2e39cd8f..d4ce1f8a 100644 --- a/src/image.sh +++ b/src/image.sh @@ -1187,7 +1187,7 @@ parseWimHeader() { findImage() { local dir="$1" - local sources result + local name sources result sources=$(find "$dir" -maxdepth 1 -type d -iname sources -print -quit) || return 1 @@ -1196,7 +1196,10 @@ findImage() { return 1 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 warn "failed to locate 'install.wim' or 'install.esd' in ISO image, $FB"