From 6f2ebcc38fc26a355a28b13a222d50e67b8b3616 Mon Sep 17 00:00:00 2001 From: Kroese Date: Fri, 17 May 2024 12:55:59 +0200 Subject: [PATCH] Update mido.sh --- src/mido.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mido.sh b/src/mido.sh index 866fb09..56425c3 100644 --- a/src/mido.sh +++ b/src/mido.sh @@ -476,17 +476,18 @@ getESD() { error "Failed to find $xFile in $wFile!" && return 1 fi - local esdLang="en-us" + local esdLang="${language,,}" local edQuery='//File[Architecture="'${PLATFORM}'"][Edition="'${editionName}'"]' echo -e '' > "$dir/$fFile" xmllint --nonet --xpath "${edQuery}" "$dir/$xFile" >> "$dir/$fFile" 2>/dev/null echo -e ''>> "$dir/$fFile" + xmllint --nonet --xpath '//File[LanguageCode="'${esdLang}'"]' "$dir/$fFile" >"$dir/$eFile" size=$(stat -c%s "$dir/$eFile") if ((size<20)); then - error "Failed to find Windows product in $eFile!" && return 1 + error "Language \"$language\" is not supported by this download method!" && return 1 fi local tag="FilePath"