Repair chunked uploads

There's been a confusion between the chunk number and the chunk
offset leading to corruptions... Let's pass the proper offset to
the UploadDevice again.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
This commit is contained in:
Kevin Ottens 2021-01-13 18:00:19 +01:00
parent f7be923b73
commit 5325e058d8
No known key found for this signature in database
GPG key ID: 074BBBCB8DECC9E2

View file

@ -318,7 +318,7 @@ void PropagateUploadFileNG::startNextChunk()
const QString fileName = _fileToUpload._path;
auto device = std::make_unique<UploadDevice>(
fileName, _currentChunk, _currentChunkSize, &propagator()->_bandwidthManager);
fileName, _sent, _currentChunkSize, &propagator()->_bandwidthManager);
if (!device->open(QIODevice::ReadOnly)) {
qCWarning(lcPropagateUploadNG) << "Could not prepare upload device: " << device->errorString();