download: don't read whole file into ram to md5 it

we go to the trouble of using a tempfile and then reintroduce
a case of reading the whole file into ram again?
pull/520/head
Aaron Miller 1 year ago committed by AT
parent 18fa61c025
commit 5641c365af

@ -271,7 +271,6 @@ void HashAndSaveFile::hashAndSave(const QString &expectedHash, const QString &sa
}
QCryptographicHash hash(QCryptographicHash::Md5);
hash.addData(tempFile->readAll());
while(!tempFile->atEnd())
hash.addData(tempFile->read(16384));
if (hash.result().toHex() != expectedHash) {

Loading…
Cancel
Save