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:
parent
7643fd2e77
commit
463147391c
@ -204,6 +204,16 @@ download() {
|
|||||||
echo "Could not download \"$i\"..."
|
echo "Could not download \"$i\"..."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
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
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user