Process OneDrive Personal Shared Folders only if account type is 'personal' (#972)

* Update code to ensure that OneDrive Shared Folders are processed, only if account type is 'personal'
This commit is contained in:
abraunegg 2020-06-28 10:57:21 +10:00 committed by GitHub
parent d653fc7ee2
commit 41d92ddab5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -539,14 +539,18 @@ final class SyncEngine
applyDifferences(driveId, rootId, performFullItemScan);
// Check OneDrive Personal Shared Folders
// https://github.com/OneDrive/onedrive-api-docs/issues/764
Item[] items = itemdb.selectRemoteItems();
foreach (item; items) {
log.vdebug("------------------------------------------------------------------");
if (!cfg.getValueBool("monitor")) {
log.log("Syncing this OneDrive Personal Shared Folder: ", item.name);
} else {
log.vlog("Syncing this OneDrive Personal Shared Folder: ", item.name);
if (accountType == "personal"){
// https://github.com/OneDrive/onedrive-api-docs/issues/764
Item[] items = itemdb.selectRemoteItems();
foreach (item; items) {
log.vdebug("------------------------------------------------------------------");
if (!cfg.getValueBool("monitor")) {
log.log("Syncing this OneDrive Personal Shared Folder: ", item.name);
} else {
log.vlog("Syncing this OneDrive Personal Shared Folder: ", item.name);
}
// Check OneDrive Personal Folders
applyDifferences(item.remoteDriveId, item.remoteId, performFullItemScan);
}
}