Fixed file validation for .exe files.
This commit is contained in:
parent
382c200dc3
commit
4300c3dda3
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user