Fix Bug #3616: Update getRemainingFreeSpaceOnline() for Business and SharePoint Accounts (#3621)

* Ensure 'driveId' is set correctly when not using a Personal Account type
This commit is contained in:
abraunegg 2026-01-27 06:41:22 +11:00 committed by GitHub
commit 85c8a2e39f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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