diff options
author | Hannah von Reth <hannah.vonreth@owncloud.com> | 2020-12-01 18:58:19 +0300 |
---|---|---|
committer | Hannah von Reth <vonreth@kde.org> | 2020-12-01 19:17:25 +0300 |
commit | e118838199f8f0537c1b90893d12c119bce7aa08 (patch) | |
tree | f9befc321086c34b0da3d92a27c91207940c309b | |
parent | 8f35362f82b854783fe21ad08544ee76e2cadea6 (diff) |
Owncloud - virtual files smaller <1KB - problems with syncing
The issue was caused by gziped responses not providing a
content lenght header.
Fixes: #8248
-rw-r--r-- | changelog/unreleased/8248 | 6 | ||||
-rw-r--r-- | src/libsync/propagatedownload.cpp | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/changelog/unreleased/8248 b/changelog/unreleased/8248 new file mode 100644 index 000000000..dec7ebd57 --- /dev/null +++ b/changelog/unreleased/8248 @@ -0,0 +1,6 @@ +Bugfix: Sync small plaintext files with Windows VFS + +We fixed a bug where small plaintext files where not synced +due to a broken interity check. + +https://github.com/owncloud/client/issues/8248 diff --git a/src/libsync/propagatedownload.cpp b/src/libsync/propagatedownload.cpp index 3c76b3c3e..9bd536c01 100644 --- a/src/libsync/propagatedownload.cpp +++ b/src/libsync/propagatedownload.cpp @@ -190,8 +190,9 @@ void GETFileJob::slotMetaDataChanged() return; } - _contentLength = reply()->header(QNetworkRequest::ContentLengthHeader).toLongLong(); - if (_expectedContentLength != -1 && _contentLength != _expectedContentLength) { + bool ok; + _contentLength = reply()->header(QNetworkRequest::ContentLengthHeader).toLongLong(&ok); + if (ok && _expectedContentLength != -1 && _contentLength != _expectedContentLength) { qCWarning(lcGetJob) << "We received a different content length than expected!" << _expectedContentLength << "vs" << _contentLength; _errorString = tr("We received an unexpected download Content-Length."); |