[Pkg-owncloud-commits] [owncloud-client] 152/470: Propagator: On remove move, take size from DB

Sandro Knauß hefee-guest at moszumanska.debian.org
Thu May 12 16:24:56 UTC 2016


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit 9d5307d04c48ead4faf49b5bfa0eca0042c83a61
Author: Markus Goetz <markus at woboq.com>
Date:   Tue Mar 15 10:28:47 2016 +0100

    Propagator: On remove move, take size from DB
    
    Some servers can claim different sizes for on-the-fly protected/encrypted
    MS Office files during discovery.
---
 src/libsync/propagateremotemove.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/libsync/propagateremotemove.cpp b/src/libsync/propagateremotemove.cpp
index f41fd13..66476c3 100644
--- a/src/libsync/propagateremotemove.cpp
+++ b/src/libsync/propagateremotemove.cpp
@@ -160,6 +160,10 @@ void PropagateRemoteMove::finalize()
     record._path = _item->_renameTarget;
     record._contentChecksum = oldRecord._contentChecksum;
     record._contentChecksumType = oldRecord._contentChecksumType;
+    if (record._fileSize != oldRecord._fileSize) {
+        qDebug() << "Warning: file sizes differ on server vs csync_journal: " << record._fileSize << oldRecord._fileSize;
+        record._fileSize = oldRecord._fileSize; // server might have claimed different size, we take the old one from the DB
+    }
 
     _propagator->_journal->setFileRecord(record);
     _propagator->_journal->commit("Remote Rename");

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list