Initial file download verification code. I'm not sure if it will work, but hopefully. Please watch for bugs, especially when downloading zip files. If it works, I will extend it.

This commit is contained in:
Storm Dragon 2024-09-10 01:24:42 -04:00
parent 7643fd2e77
commit 463147391c

View File

@ -204,6 +204,16 @@ download() {
echo "Could not download \"$i\"..."
exit 1
fi
case "${dest##*.}" in
"zip")
if [[ "$(file -b --mime-type "${cache}/${dest}")" != "application/zip" ]]; then
rm -fv "${cache}/${dest}"
dialog --backtitle "Linux Game Manager" \
--infobox "Error downloading \"${dest}\". Installation cannot continue." -1 -1 --stdout
alert
fi
;;
esac
done
}