Encode syncFolderName for easier 'canFind' processing

* Resolve "Remote change discarded - not in --single-directory scope" when syncing Shared Folder sub directories
This commit is contained in:
abraunegg 2018-06-10 11:10:49 +10:00
parent e7267e597b
commit 943fcc032b

View file

@ -327,7 +327,7 @@ final class SyncEngine
if (("id" in idDetails) != null) {
// valid response from onedrive.getPathDetailsById(id) a JSON item object present
if ((idDetails["id"].str == id) && (isItemFolder(idDetails))){
syncFolderName = idDetails["name"].str;
syncFolderName = encodeComponent(idDetails["name"].str);
}
}
@ -389,6 +389,7 @@ final class SyncEngine
} else {
// What is this item's path?
thisItemPath = item["parentReference"]["path"].str;
// Check this item's id to see if this is a change we want to process
if ( (item["id"].str == id) || (item["parentReference"]["id"].str == id) || (canFind(thisItemPath, syncFolderName)) ){
// This is a change we want to apply