mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-26 06:55:59 +03:00
Print checksum on mismatch
This commit is contained in:
parent
fd6146d09e
commit
23f7c51f70
2 changed files with 3 additions and 3 deletions
|
@ -357,7 +357,7 @@ void ValidateChecksumHeader::slotChecksumCalculated(const QByteArray &checksumTy
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (checksum != _expectedChecksum) {
|
if (checksum != _expectedChecksum) {
|
||||||
emit validationFailed(tr("The downloaded file does not match the checksum, it will be resumed."));
|
emit validationFailed(tr("The downloaded file does not match the checksum, it will be resumed. '%1' != '%2'").arg(QString::fromUtf8(_expectedChecksum), QString::fromUtf8(checksum)));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
emit validated(checksumType, checksum);
|
emit validated(checksumType, checksum);
|
||||||
|
|
|
@ -43,7 +43,7 @@ using namespace OCC::Utility;
|
||||||
}
|
}
|
||||||
|
|
||||||
void slotDownError( const QString& errMsg ) {
|
void slotDownError( const QString& errMsg ) {
|
||||||
QVERIFY(_expectedError == errMsg );
|
QCOMPARE(_expectedError, errMsg);
|
||||||
_errorSeen = true;
|
_errorSeen = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -196,7 +196,7 @@ using namespace OCC::Utility;
|
||||||
|
|
||||||
QTRY_VERIFY(_successDown);
|
QTRY_VERIFY(_successDown);
|
||||||
|
|
||||||
_expectedError = QLatin1String("The downloaded file does not match the checksum, it will be resumed.");
|
_expectedError = QStringLiteral("The downloaded file does not match the checksum, it will be resumed. '543345' != '%1'").arg(QString::fromUtf8(_expected));
|
||||||
_errorSeen = false;
|
_errorSeen = false;
|
||||||
file->seek(0);
|
file->seek(0);
|
||||||
vali->start(_testfile, "Adler32:543345");
|
vali->start(_testfile, "Adler32:543345");
|
||||||
|
|
Loading…
Reference in a new issue