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?
This commit is contained in:
Aaron Miller 2023-04-26 17:58:36 -07:00 committed by AT
parent 1f371be395
commit d1c69e8234

View File

@ -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) {