mirror of
https://github.com/abraunegg/onedrive
synced 2026-03-14 14:35:46 +01:00
Update sync.d
* Cater for the case the sourceDriveId could be empty
This commit is contained in:
parent
92affac3d2
commit
820d8e46b0
1 changed files with 9 additions and 4 deletions
13
src/sync.d
13
src/sync.d
|
|
@ -7214,12 +7214,17 @@ class SyncEngine {
|
|||
driveId = appConfig.defaultDriveId;
|
||||
}
|
||||
|
||||
// Issue #3115 - Validate driveId length
|
||||
// Issue #3115 - Validate sourceDriveId length
|
||||
// What account type is this?
|
||||
if (appConfig.accountType == "personal") {
|
||||
// Test driveId length and validation
|
||||
// Once checked and validated, we only need to check 'driveId' if it does not match exactly 'appConfig.defaultDriveId'
|
||||
driveId = transformToLowerCase(testProvidedDriveIdForLengthIssue(sourceDriveId));
|
||||
// Test sourceDriveId length and validation
|
||||
if (!sourceDriveId.empty) {
|
||||
// We were provided a sourceDriveId - that is what we check
|
||||
driveId = transformToLowerCase(testProvidedDriveIdForLengthIssue(sourceDriveId));
|
||||
} else {
|
||||
// No sourceDriveId provided - use appConfig.defaultDriveId and validate that
|
||||
driveId = transformToLowerCase(testProvidedDriveIdForLengthIssue(appConfig.defaultDriveId));
|
||||
}
|
||||
}
|
||||
|
||||
// Try and query the quota for the provided driveId
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue