From 5641c365afb8b324be22f7458de65f7d8e286e84 Mon Sep 17 00:00:00 2001 From: Aaron Miller Date: Wed, 26 Apr 2023 17:58:36 -0700 Subject: [PATCH] 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? --- download.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/download.cpp b/download.cpp index 80dab3e2..4f41bbd0 100644 --- a/download.cpp +++ b/download.cpp @@ -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) {