Ensure path does not start with '/' before sync_list check (#2215)

* Ensure path does not start with '/' before sync_list check due to changes from 2211 and 2212
This commit is contained in:
abraunegg 2022-11-10 14:28:20 +11:00 committed by GitHub
parent 361c3cf0a1
commit 941e1e215d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2411,6 +2411,10 @@ final class SyncEngine
path = computeItemPath(item.driveId, item.parentId) ~ "/" ~ item.name;
}
path = buildNormalizedPath(path);
// 'path' at this stage must not start with '/'
path = path.strip('/');
if (selectiveSync.isPathExcludedViaSyncList(path)) {
// selective sync advised to skip, however is this a file and are we configured to upload / download files in the root?
if ((isItemFile(driveItem)) && (cfg.getValueBool("sync_root_files")) && (rootName(path) == "") ) {