diff --git a/src/sync.d b/src/sync.d index 4ebbb041..c1849ea1 100644 --- a/src/sync.d +++ b/src/sync.d @@ -754,9 +754,17 @@ final class SyncEngine bool unwanted; unwanted |= skippedItems.find(item.parentId).length != 0; if (unwanted) log.vdebug("Flagging as unwanted: find(item.parentId).length != 0"); - unwanted |= selectiveSync.isFileNameExcluded(item.name); - if (unwanted) log.vdebug("Flagging as unwanted: item name is excluded: ", item.name); - + // Check if this is a directory to skip + if (!unwanted) { + unwanted = selectiveSync.isDirNameExcluded(item.name); + if (unwanted) log.vlog("Skipping item - excluded by skip_dir config: ", item.name); + } + // Check if this is a file to skip + if (!unwanted) { + unwanted = selectiveSync.isFileNameExcluded(item.name); + if (unwanted) log.vlog("Skipping item - excluded by skip_file config: ", item.name); + } + // check the item type if (!unwanted) { if (isItemFile(driveItem)) {