From 4300c3dda38ecf0195f149fc388d0d2b5a0beb5b Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Tue, 24 Dec 2024 19:18:01 -0500 Subject: [PATCH] Fixed file validation for .exe files. --- audiogame-manager.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/audiogame-manager.sh b/audiogame-manager.sh index 0ed730e..79bc81e 100755 --- a/audiogame-manager.sh +++ b/audiogame-manager.sh @@ -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