mirror of
https://github.com/abraunegg/onedrive
synced 2024-05-18 05:36:41 +02:00
Update sync.d
Change the handling of selfBuiltPath so correct path is used when attempting to test against 'sync_list'
This commit is contained in:
parent
c2e98ff639
commit
06061da419
20
src/sync.d
20
src/sync.d
|
@ -3276,11 +3276,11 @@ class SyncEngine {
|
|||
// If there is a parent reference path, try and use it
|
||||
string selfBuiltPath = onedriveJSONItem["parentReference"]["path"].str ~ "/" ~ onedriveJSONItem["name"].str;
|
||||
|
||||
// Check for and remove 'root:' prefix if present
|
||||
auto indexOfRoot = selfBuiltPath.indexOf("root:");
|
||||
if (indexOfRoot != -1) {
|
||||
// Remove 'root:' and everything before it
|
||||
selfBuiltPath = selfBuiltPath[indexOfRoot + 5 .. $];
|
||||
// Check for ':' and split if present
|
||||
auto splitIndex = selfBuiltPath.indexOf(":");
|
||||
if (splitIndex != -1) {
|
||||
// Keep only the part after ':'
|
||||
selfBuiltPath = selfBuiltPath[splitIndex + 1 .. $];
|
||||
}
|
||||
|
||||
// Set newItemPath to the self built path
|
||||
|
@ -6786,11 +6786,11 @@ class SyncEngine {
|
|||
// If there is a parent reference path, try and use it
|
||||
string selfBuiltPath = onedriveJSONItem["parentReference"]["path"].str ~ "/" ~ onedriveJSONItem["name"].str;
|
||||
|
||||
// Check for and remove 'root:' prefix if present
|
||||
auto indexOfRoot = selfBuiltPath.indexOf("root:");
|
||||
if (indexOfRoot != -1) {
|
||||
// Remove 'root:' and everything before it
|
||||
selfBuiltPath = selfBuiltPath[indexOfRoot + 5 .. $];
|
||||
// Check for ':' and split if present
|
||||
auto splitIndex = selfBuiltPath.indexOf(":");
|
||||
if (splitIndex != -1) {
|
||||
// Keep only the part after ':'
|
||||
selfBuiltPath = selfBuiltPath[splitIndex + 1 .. $];
|
||||
}
|
||||
|
||||
// Set thisItemPath to the self built path
|
||||
|
|
Loading…
Reference in a new issue