SyncEngine: Keep local size in SyncItem #5855
authorMarkus Goetz <markus@woboq.com>
Fri, 23 Jun 2017 14:53:23 +0000 (16:53 +0200)
committerMarkus Goetz <markus@woboq.com>
Tue, 4 Jul 2017 09:42:44 +0000 (11:42 +0200)
src/libsync/syncengine.cpp

index 5aa2376b0a59848ea21cce431d906c5decab5ac0..5efee80afa07a7309c4437f3066b867300fd9830 100644 (file)
@@ -386,8 +386,10 @@ int SyncEngine::treewalkFile( TREE_WALK_FILE *file, bool remote )
 
     if (item->_instruction == CSYNC_INSTRUCTION_NONE
             || (item->_instruction == CSYNC_INSTRUCTION_IGNORE && instruction != CSYNC_INSTRUCTION_NONE)) {
+        // Take values from side (local/remote) where instruction is not _NONE
         item->_instruction = instruction;
         item->_modtime = file->modtime;
+        item->_size = file->size;
     } else {
         if (instruction != CSYNC_INSTRUCTION_NONE) {
             qWarning() << "ERROR: Instruction" << item->_instruction << "vs" << instruction << "for" << fileUtf8;
@@ -517,7 +519,7 @@ int SyncEngine::treewalkFile( TREE_WALK_FILE *file, bool remote )
     if (file->etag && file->etag[0]) {
         item->_etag = file->etag;
     }
-    item->_size = file->size;
+
 
     if (!item->_inode) {
         item->_inode = file->inode;