mirror of
https://github.com/abraunegg/onedrive
synced 2024-05-31 04:52:33 +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/)
|
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).
|
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
|
## [1.1.1] - 2018-01-20
|
||||||
### Fixed
|
### Fixed
|
||||||
- Wrong regex for parsing authentication uri
|
- Wrong regex for parsing authentication uri
|
||||||
|
|
|
@ -160,7 +160,7 @@ final class SyncEngine
|
||||||
JSONValue changes;
|
JSONValue changes;
|
||||||
string deltaLink = itemdb.getDeltaLink(driveId, id);
|
string deltaLink = itemdb.getDeltaLink(driveId, id);
|
||||||
log.vlog("Applying changes of " ~ id);
|
log.vlog("Applying changes of " ~ id);
|
||||||
do {
|
for (;;) {
|
||||||
try {
|
try {
|
||||||
changes = onedrive.viewChangesById(driveId, id, deltaLink);
|
changes = onedrive.viewChangesById(driveId, id, deltaLink);
|
||||||
} catch (OneDriveException e) {
|
} catch (OneDriveException e) {
|
||||||
|
@ -181,7 +181,8 @@ final class SyncEngine
|
||||||
if ("@odata.deltaLink" in changes) deltaLink = changes["@odata.deltaLink"].str;
|
if ("@odata.deltaLink" in changes) deltaLink = changes["@odata.deltaLink"].str;
|
||||||
if (deltaLink) itemdb.setDeltaLink(driveId, id, deltaLink);
|
if (deltaLink) itemdb.setDeltaLink(driveId, id, deltaLink);
|
||||||
if ("@odata.nextLink" in changes) deltaLink = changes["@odata.nextLink"].str;
|
if ("@odata.nextLink" in changes) deltaLink = changes["@odata.nextLink"].str;
|
||||||
} while ("@odata.nextLink" in changes);
|
else break;
|
||||||
|
}
|
||||||
|
|
||||||
// delete items in idsToDelete
|
// delete items in idsToDelete
|
||||||
if (idsToDelete.length > 0) deleteItems();
|
if (idsToDelete.length > 0) deleteItems();
|
||||||
|
|
Loading…
Reference in a new issue