From 4e1deec9338ae9c14745be0c6f36200df989e230 Mon Sep 17 00:00:00 2001 From: abraunegg Date: Sun, 5 Jun 2022 14:52:24 +1000 Subject: [PATCH] Update Business Shared Folders to use a /delta query (#1989) * Change Business Shared Folders to use a /delta query now that the OneDrive API appears to support such query --- src/sync.d | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sync.d b/src/sync.d index ee563771..216f050a 100644 --- a/src/sync.d +++ b/src/sync.d @@ -1488,11 +1488,11 @@ final class SyncEngine // National Cloud Deployments (US and DE) do not support /delta as a query // https://docs.microsoft.com/en-us/graph/deployments#supported-features // Are we running against a National Cloud Deployments that does not support /delta - if ((nationalCloudDeployment) || ((driveId!= defaultDriveId) && (syncBusinessFolders))) { + if (nationalCloudDeployment) { // Have to query /children rather than /delta nationalCloudChildrenScan = true; log.vdebug("Using /children call to query drive for items to populate 'changes' and 'changesAvailable'"); - // In OneDrive Business Shared Folder scenario, if ALL items are downgraded, then this leads to local file deletion + // In a OneDrive Business Shared Folder scenario + nationalCloudDeployment, if ALL items are downgraded, then this leads to local file deletion // Downgrade ONLY files associated with this driveId and idToQuery log.vdebug("Downgrading all children for this driveId (" ~ driveId ~ ") and idToQuery (" ~ idToQuery ~ ") to an out-of-sync state"); // Before we get any data, flag any object in the database as out-of-sync for this driveID & ID @@ -1505,7 +1505,7 @@ final class SyncEngine } } - // Build own 'changes' response + // Build own 'changes' response to simulate a /delta response try { // we have to 'build' our own JSON response that looks like /delta changes = generateDeltaResponse(driveId, idToQuery);