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