mirror of
https://github.com/abraunegg/onedrive
synced 2024-05-09 09:16:42 +02:00
Fix crash when the delta link is expired
This commit is contained in:
parent
d9a5d1b3b9
commit
008a5756b3
|
@ -3,6 +3,10 @@
|
|||
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
||||
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [Unreleased]
|
||||
### Fixed
|
||||
- Crash when the delta link is expired
|
||||
|
||||
## [1.1.1] - 2018-01-20
|
||||
### Fixed
|
||||
- Wrong regex for parsing authentication uri
|
||||
|
|
|
@ -160,7 +160,7 @@ final class SyncEngine
|
|||
JSONValue changes;
|
||||
string deltaLink = itemdb.getDeltaLink(driveId, id);
|
||||
log.vlog("Applying changes of " ~ id);
|
||||
do {
|
||||
for (;;) {
|
||||
try {
|
||||
changes = onedrive.viewChangesById(driveId, id, deltaLink);
|
||||
} catch (OneDriveException e) {
|
||||
|
@ -181,7 +181,8 @@ final class SyncEngine
|
|||
if ("@odata.deltaLink" in changes) deltaLink = changes["@odata.deltaLink"].str;
|
||||
if (deltaLink) itemdb.setDeltaLink(driveId, id, deltaLink);
|
||||
if ("@odata.nextLink" in changes) deltaLink = changes["@odata.nextLink"].str;
|
||||
} while ("@odata.nextLink" in changes);
|
||||
else break;
|
||||
}
|
||||
|
||||
// delete items in idsToDelete
|
||||
if (idsToDelete.length > 0) deleteItems();
|
||||
|
|
Loading…
Reference in a new issue