Update 'skip_dir' handling to check against OneDrive new downloads (#427)

* Add check for directories to match skip_dir entries for OneDrive objects to download
* Update logging as to why a OneDrive object was skipped
This commit is contained in:
abraunegg 2019-03-22 15:21:59 +11:00 committed by GitHub
parent 8f28daec8a
commit f5c3e7643d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)) {