mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-26 23:28:14 +03:00
Add workaround for issue discovered in https://github.com/owncloud/core/pull/38304
This commit is contained in:
parent
3b99b11849
commit
9ffa7bcd4d
1 changed files with 7 additions and 2 deletions
|
@ -153,8 +153,13 @@ QByteArray findBestChecksum(const QByteArray &_checksums)
|
|||
|| -1 != (i = checksums.indexOf(QLatin1String("MD5:"), 0, Qt::CaseInsensitive))
|
||||
|| -1 != (i = checksums.indexOf(QLatin1String("ADLER32:"), 0, Qt::CaseInsensitive))) {
|
||||
// Now i is the start of the best checksum
|
||||
// Grab it until the next space or end of string.
|
||||
return _checksums.mid(i, _checksums.indexOf(' ', i) - i);
|
||||
// Grab it until the next space or end of xml or end of string.
|
||||
int end = _checksums.indexOf(' ', i);
|
||||
// workaround for https://github.com/owncloud/core/pull/38304
|
||||
if (end == -1) {
|
||||
end = _checksums.indexOf('<', i);
|
||||
}
|
||||
return _checksums.mid(i, end - i);
|
||||
}
|
||||
qCWarning(lcChecksums) << "Failed to parse" << _checksums;
|
||||
return QByteArray();
|
||||
|
|
Loading…
Reference in a new issue