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