mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-07-08 13:08:29 +02:00
Improve checksum mismatch logging (#5413)
This commit is contained in:
commit
af8225e2da
3 changed files with 8 additions and 7 deletions
|
|
@ -38,7 +38,6 @@
|
|||
#include "Validator.h"
|
||||
|
||||
#include <QCryptographicHash>
|
||||
#include <QFile>
|
||||
|
||||
namespace Net {
|
||||
class ChecksumValidator : public Validator {
|
||||
|
|
@ -69,10 +68,10 @@ class ChecksumValidator : public Validator {
|
|||
return true;
|
||||
}
|
||||
|
||||
auto validate(QNetworkReply&) -> bool override
|
||||
auto validate(QNetworkReply& reply) -> bool override
|
||||
{
|
||||
if (m_expected.size() && m_expected != hash()) {
|
||||
qWarning() << "Checksum mismatch, download is bad.";
|
||||
if (!m_expected.isEmpty() && m_expected != hash()) {
|
||||
qWarning() << "Checksum mismatch for URL:" << reply.url().toString() << "expected:" << m_expected << "got:" << hash();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue