Merge pull request #6975 from nextcloud/bugfix/fixImplicitHydrationCorruptedData

use QByteArray::left to send the newly received data during hydration
This commit is contained in:
Matthieu Gallien 2024-08-06 18:20:43 +02:00 committed by GitHub
commit a754e2af74
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -318,7 +318,7 @@ void GETFileJob::slotReadyRead()
return; return;
} }
const qint64 writtenBytes = writeToDevice(QByteArray::fromRawData(buffer.constData(), readBytes)); const qint64 writtenBytes = writeToDevice(buffer.left(readBytes));
if (writtenBytes != readBytes) { if (writtenBytes != readBytes) {
_errorString = _device->errorString(); _errorString = _device->errorString();
_errorStatus = SyncFileItem::NormalError; _errorStatus = SyncFileItem::NormalError;