SyncEngine: Folders with ignored files should not count when counting none files
authorOlivier Goffart <ogoffart@woboq.com>
Fri, 16 Oct 2015 09:29:35 +0000 (11:29 +0200)
committerOlivier Goffart <ogoffart@woboq.com>
Fri, 16 Oct 2015 09:43:52 +0000 (11:43 +0200)
If there is a any none files, we do not show the dialog saying that all
files have been removed. If a directory contiains ignored files, we still
want to show this message box even if the directory will not be deleted

src/libsync/syncengine.cpp

index 1b58d0b1ea94797838e490b8822506cc2e75df38..1f6205a7caf7675afc7e13b1fe9020410802b9aa 100644 (file)
@@ -479,7 +479,9 @@ int SyncEngine::treewalkFile( TREE_WALK_FILE *file, bool remote )
             dir = SyncFileItem::None;
         } else {
             // No need to do anything.
-            if (file->other.instruction == CSYNC_INSTRUCTION_NONE) {
+            if (file->other.instruction == CSYNC_INSTRUCTION_NONE
+                    // Directories with ignored files does not count as 'None'
+                    && (file->type != CSYNC_FTW_TYPE_DIR || !file->has_ignored_files)) {
                 _hasNoneFiles = true;
             }