mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-07-01 19:06:58 +03:00
fix: log error if file open/commit fails
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
This commit is contained in:
parent
09823dbb4a
commit
838687fb2e
23 changed files with 54 additions and 44 deletions
|
|
@ -108,13 +108,13 @@ void ModrinthPackExportTask::collectHashes()
|
|||
|
||||
QFile openFile(file.absoluteFilePath());
|
||||
if (!openFile.open(QFile::ReadOnly)) {
|
||||
qWarning() << "Could not open" << file << "for hashing";
|
||||
qWarning() << "Could not open" << file << "for hashing:" << openFile.errorString();
|
||||
continue;
|
||||
}
|
||||
|
||||
const QByteArray data = openFile.readAll();
|
||||
if (openFile.error() != QFileDevice::NoError) {
|
||||
qWarning() << "Could not read" << file;
|
||||
qWarning() << "Could not read" << file << "error:" << openFile.errorString();
|
||||
continue;
|
||||
}
|
||||
auto sha512 = Hashing::hash(data, Hashing::Algorithm::Sha512);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue