Sync engine: Check the blacklist for the right tree
authorOlivier Goffart <ogoffart@woboq.com>
Tue, 24 Mar 2015 11:17:48 +0000 (12:17 +0100)
committerOlivier Goffart <ogoffart@woboq.com>
Tue, 24 Mar 2015 11:23:04 +0000 (12:23 +0100)
When the operation is download, we have a INSTRUCTION_NONE for the local
tree, but we should not check the blacklist just yet.

src/libsync/syncengine.cpp

index 55e2639db6c39baada82f619d60d77d3900d27de..ad10daf9c8f8d234d2fa89059a0df4b3d66f0745 100644 (file)
@@ -484,9 +484,11 @@ int SyncEngine::treewalkFile( TREE_WALK_FILE *file, bool remote )
     }
 
     item._direction = dir;
-    // check for blacklisting of this item.
-    // if the item is on blacklist, the instruction was set to IGNORE
-    checkErrorBlacklisting( &item );
+    if (instruction != CSYNC_INSTRUCTION_NONE) {
+        // check for blacklisting of this item.
+        // if the item is on blacklist, the instruction was set to ERROR
+        checkErrorBlacklisting( &item );
+    }
 
     if (!item._isDirectory) {
         _progressInfo._totalFileCount++;