From 8233b33d67f9f0a68c5d6aa951d64dd088d72ca2 Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Tue, 6 Aug 2024 16:39:41 +0200 Subject: [PATCH] use QByteArray::left to send the newly received data during hydration we use the proper method from QByteArray to forward the data received by GETFileJob to the socket connected to teh fetch data CfApi callback Close https://github.com/nextcloud/desktop/issues/6769 Signed-off-by: Matthieu Gallien --- src/libsync/propagatedownload.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libsync/propagatedownload.cpp b/src/libsync/propagatedownload.cpp index a36a11ccd4..417f6bedc8 100644 --- a/src/libsync/propagatedownload.cpp +++ b/src/libsync/propagatedownload.cpp @@ -318,7 +318,7 @@ void GETFileJob::slotReadyRead() return; } - const qint64 writtenBytes = writeToDevice(QByteArray::fromRawData(buffer.constData(), readBytes)); + const qint64 writtenBytes = writeToDevice(buffer.left(readBytes)); if (writtenBytes != readBytes) { _errorString = _device->errorString(); _errorStatus = SyncFileItem::NormalError;