Fixed file validation for .exe files.

This commit is contained in:
Storm Dragon 2024-12-24 19:18:01 -05:00
parent 382c200dc3
commit 4300c3dda3

View File

@ -312,9 +312,8 @@ download() {
;;
"exe")
# Check if it's a valid Windows executable by looking at the MZ header
if ! hexdump -n 2 -v -e '/1 "%02X"' "${cache}/${dest}" | grep -q "4D5A"; then
downloadError=0
fi
hexdump -n 2 -v -e '/1 "%02X"' "${cache}/${dest}" | grep -q "4D5A"
downloadError=$?
;;
"wad")
if [[ "$(file -b --mime-type "${cache}/${dest}")" != "application/octet-stream" ]]; then