mirror of
https://github.com/abraunegg/onedrive
synced 2026-03-14 14:35:46 +01:00
* Ensure that the driveId of a modified file that is to be uploaded to, exists in the cached array
This commit is contained in:
parent
0e76dc4ef8
commit
4f501b4aaf
1 changed files with 11 additions and 1 deletions
12
src/sync.d
12
src/sync.d
|
|
@ -6452,13 +6452,23 @@ class SyncEngine {
|
|||
targetItemId = changedItemId;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Fetch the details from cachedOnlineDriveData if this is available
|
||||
// - cachedOnlineDriveData.quotaRestricted;
|
||||
// - cachedOnlineDriveData.quotaAvailable;
|
||||
// - cachedOnlineDriveData.quotaRemaining;
|
||||
DriveDetailsCache cachedOnlineDriveData;
|
||||
|
||||
// Make sure that parentItem.driveId is in our driveIDs array to use when checking if item is in database
|
||||
// Keep the DriveDetailsCache array with unique entries only
|
||||
if (!canFindDriveId(targetDriveId, cachedOnlineDriveData)) {
|
||||
// Add this driveId to the drive cache, which then also sets for the defaultDriveId:
|
||||
// - quotaRestricted;
|
||||
// - quotaAvailable;
|
||||
// - quotaRemaining;
|
||||
addOrUpdateOneDriveOnlineDetails(targetDriveId);
|
||||
}
|
||||
|
||||
// Query the details using the correct 'targetDriveId' for this modified file to be uploaded
|
||||
cachedOnlineDriveData = getDriveDetails(targetDriveId);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue