mirror of
https://github.com/nomic-ai/gpt4all
synced 2024-11-08 07:10:32 +00:00
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:
parent
1f371be395
commit
d1c69e8234
@ -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…
Reference in New Issue
Block a user