From dcc0322cac451ec2297f7df03e770a978d94e268 Mon Sep 17 00:00:00 2001 From: abraunegg Date: Sat, 2 May 2020 04:46:44 +1000 Subject: [PATCH] Update how './' is stripped from a path before check if excluded (Issue #901) (#902) * Update how './' is stripped from a path before check if excluded --- src/sync.d | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sync.d b/src/sync.d index 6b722beb..becfc579 100644 --- a/src/sync.d +++ b/src/sync.d @@ -2798,7 +2798,7 @@ final class SyncEngine log.vdebug("Checking path: ", path); // Only check path if config is != "" if (cfg.getValueString("skip_dir") != "") { - if (selectiveSync.isDirNameExcluded(strip(path,"./"))) { + if (selectiveSync.isDirNameExcluded(path.strip('.').strip('/'))) { log.vlog("Skipping item - excluded by skip_dir config: ", path); return; } @@ -2806,13 +2806,13 @@ final class SyncEngine } if (isFile(path)) { log.vdebug("Checking file: ", path); - if (selectiveSync.isFileNameExcluded(strip(path,"./"))) { + if (selectiveSync.isFileNameExcluded(path.strip('.').strip('/'))) { log.vlog("Skipping item - excluded by skip_file config: ", path); return; } } if (selectiveSync.isPathExcludedViaSyncList(path)) { - if ((isFile(path)) && (cfg.getValueBool("sync_root_files")) && (rootName(strip(path,"./")) == "")) { + if ((isFile(path)) && (cfg.getValueBool("sync_root_files")) && (rootName(path.strip('.').strip('/')) == "")) { log.vdebug("Not skipping path due to sync_root_files inclusion: ", path); } else { string userSyncList = cfg.configDirName ~ "/sync_list";