ref: hashComparer

This commit is contained in:
semenov
2024-10-07 09:02:53 +03:00
parent 3d66dc16ce
commit 867f0b9730
22 changed files with 255 additions and 134 deletions

View File

@@ -8,6 +8,7 @@ UpdateController::UpdateController(DataParser *parser,SendSystem *sendSystem, QO
this->dataParser = parser;
this->sendSystem = sendSystem;
localPath = QDir::currentPath() + applicationFolderName;
calculateStreamingHash();
}
void UpdateController::calculateCommonHash()
@@ -69,12 +70,13 @@ void UpdateController::calculateHash(QString path)
readSize = qMin(fileSize,bufferSize);
}
file.close();
hashString = QString(hash.result().toHex());
currentFile.path = Tools::createLocalPath(fileInfo.absoluteFilePath());
currentFile.hash = hashString;
files->push_back(currentFile);
file.close();
}
else if (fileInfo.isDir() && !fileInfo.isRoot() && fileInfo.fileName() != "..")
{