Skip to content

Commit b488c0b

Browse files
committed
Update sync.d
* Perform driveId length on root JSON to avoid a false positive on testing driveId not being equal to appConfig.defaultDriveId to flush out 'root' remote drive entries that we dont add
1 parent 7ec529b commit b488c0b

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/sync.d

+10-1
Original file line numberDiff line numberDiff line change
@@ -1795,7 +1795,7 @@ class SyncEngine {
17951795

17961796
// Add this JSON item for further processing if this is not being discarded
17971797
if (!discardDeltaJSONItem) {
1798-
// If 'personal' account type, we must validate ["parentReference"]["driveId"] value in this raw
1798+
// If 'personal' account type, we must validate ["parentReference"]["driveId"] value in this raw JSON
17991799
// Issue #3115 - Validate driveId length
18001800
// What account type is this?
18011801
if (appConfig.accountType == "personal") {
@@ -9132,6 +9132,15 @@ class SyncEngine {
91329132
addLogEntry(logMessage, ["debug"]);
91339133
}
91349134
item.driveId = jsonItem["parentReference"]["driveId"].str;
9135+
9136+
// Issue #3115 - Validate driveId length
9137+
// What account type is this?
9138+
if (appConfig.accountType == "personal") {
9139+
// Test driveId length and validation if the driveId we are testing is not equal to appConfig.defaultDriveId
9140+
if (item.driveId != appConfig.defaultDriveId) {
9141+
item.driveId = testProvidedDriveIdForLengthIssue(item.driveId);
9142+
}
9143+
}
91359144
}
91369145

91379146
// We only should be adding our account 'root' to the database, not shared folder 'root' items

0 commit comments

Comments
 (0)