mirror of
https://github.com/abraunegg/onedrive
synced 2024-05-21 15:16:36 +02:00
Fix not all files being downloaded due to query failure & false DB update (#564)
* If query for file details or file object generates an error, we return, but we also need to flag that downloadFailed = true so that item is not added to the database which may cause validation issues leading to thinking that the file was downloaded but then deleted
This commit is contained in:
parent
366f7a33d1
commit
1d02b3cb7a
|
@ -1111,10 +1111,12 @@ final class SyncEngine
|
|||
} catch (OneDriveException e) {
|
||||
if (e.httpStatusCode >= 500) {
|
||||
// OneDrive returned a 'HTTP 5xx Server Side Error' - gracefully handling error - error message already logged
|
||||
downloadFailed = true;
|
||||
return;
|
||||
} else {
|
||||
// Default operation if not a 500 error
|
||||
log.error("ERROR: Query of OneDrive for file details failed");
|
||||
downloadFailed = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -1132,6 +1134,7 @@ final class SyncEngine
|
|||
// Issue #550 handling
|
||||
log.vdebug("ERROR: onedrive.getFileDetails call returned a OneDriveException error");
|
||||
// We want to return, cant download
|
||||
downloadFailed = true;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1147,6 +1150,7 @@ final class SyncEngine
|
|||
// Issue #540 handling
|
||||
log.vdebug("ERROR: onedrive.getFileDetails call returned a OneDriveException error");
|
||||
// We want to return, cant download
|
||||
downloadFailed = true;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue