Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@woboq.com>2014-11-27 16:50:49 +0300
committerOlivier Goffart <ogoffart@woboq.com>2014-11-27 16:50:49 +0300
commit2ed2ef3b28c8444dd6581330d54dac52f4170515 (patch)
tree1ad92fb0cb4e260a66e7fbe35ce54538c1367d2c /src
parente7e91b6931d4d30e86a0abc0f240cafb59c851f9 (diff)
Propagator QNAM: Fix resuming
We forgot to account the fact that we could have been resuming when comparing the size of the Content-lenght to the size of the temporary file
Diffstat (limited to 'src')
-rw-r--r--src/mirall/propagator_qnam.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mirall/propagator_qnam.cpp b/src/mirall/propagator_qnam.cpp
index ca9d4eb30..f0c815e18 100644
--- a/src/mirall/propagator_qnam.cpp
+++ b/src/mirall/propagator_qnam.cpp
@@ -749,9 +749,10 @@ void PropagateDownloadFileQNAM::slotGetFinished()
* truncated, as described here: https://github.com/owncloud/mirall/issues/2528
*/
const QByteArray sizeHeader("Content-Length");
- qint64 bodySize = job->reply()->rawHeader(sizeHeader).toLongLong();
+ quint64 bodySize = job->reply()->rawHeader(sizeHeader).toULongLong();
- if(bodySize > 0 && bodySize != _tmpFile.size() ) {
+ if(bodySize > 0 && bodySize != _tmpFile.size() - job->resumeStart() ) {
+ qDebug() << bodySize << _tmpFile.size() << job->resumeStart();
_propagator->_anotherSyncNeeded = true;
done(SyncFileItem::SoftError, tr("The file could not be downloaded completely."));
return;