From 85c8a2e39ff0519587f04874db45b98aa35400cd Mon Sep 17 00:00:00 2001 From: abraunegg Date: Tue, 27 Jan 2026 06:41:22 +1100 Subject: [PATCH] Fix Bug #3616: Update getRemainingFreeSpaceOnline() for Business and SharePoint Accounts (#3621) * Ensure 'driveId' is set correctly when not using a Personal Account type --- src/sync.d | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/sync.d b/src/sync.d index 0bfd7900..87ca1995 100644 --- a/src/sync.d +++ b/src/sync.d @@ -7208,12 +7208,6 @@ class SyncEngine { OneDriveApi getCurrentDriveQuotaApiInstance; string driveId; - // Ensure that we have a valid driveId to query - if (sourceDriveId.empty) { - // No 'driveId' was provided, use the application default - driveId = appConfig.defaultDriveId; - } - // Issue #3115 - Validate sourceDriveId length // What account type is this? if (appConfig.accountType == "personal") { @@ -7225,6 +7219,16 @@ class SyncEngine { // No sourceDriveId provided - use appConfig.defaultDriveId and validate that driveId = transformToLowerCase(testProvidedDriveIdForLengthIssue(appConfig.defaultDriveId)); } + } else { + // This is not a personal account type + // Ensure that we have a valid driveId to query + if (sourceDriveId.empty) { + // No 'driveId' was provided, use the application default + driveId = appConfig.defaultDriveId; + } else { + // A 'driveId' was provided, use the provided 'sourceDriveId' + driveId = sourceDriveId; + } } // Try and query the quota for the provided driveId