From 8ecd1989b4bc1d6b0689f251649220a27aa4b517 Mon Sep 17 00:00:00 2001 From: abraunegg Date: Sat, 23 Nov 2019 11:20:58 +1100 Subject: [PATCH] Fix where an item now out of scope should be flagged for local delete (#733) * Fix where an item now out of scope should be flagged for local delete --- src/sync.d | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/sync.d b/src/sync.d index 2d8e08df..dfe1a285 100644 --- a/src/sync.d +++ b/src/sync.d @@ -1115,14 +1115,15 @@ final class SyncEngine // item exists in database, most likely moved out of scope for current client configuration log.vdebug("This item was previously synced / seen by the client"); if (("name" in driveItem["parentReference"]) != null) { + // How is this out of scope? if (selectiveSync.isPathExcludedViaSyncList(driveItem["parentReference"]["name"].str)) { // Previously synced item is now out of scope as it has been moved out of what is included in sync_list log.vdebug("This previously synced item is now excluded from being synced due to sync_list exclusion"); - // flag to delete local file as it now is no longer in sync with OneDrive - log.vdebug("Flagging to delete item locally"); - idsToDelete ~= [item.driveId, item.id]; } - } + // flag to delete local file as it now is no longer in sync with OneDrive + log.vdebug("Flagging to delete item locally"); + idsToDelete ~= [item.driveId, item.id]; + } } }