mirror of
https://github.com/abraunegg/onedrive
synced 2024-06-03 06:22:18 +02:00
Update sync.d (#422)
* Add a check to validate if 'size' is in the JSON response
This commit is contained in:
parent
58c2805237
commit
6b8b51a7cc
|
@ -1771,7 +1771,9 @@ final class SyncEngine
|
|||
// Log action to log file
|
||||
log.fileOnly("Uploading new file ", path, " ... done.");
|
||||
|
||||
// The file was uploaded
|
||||
// The file was uploaded, or a 4xx / 5xx error was generated
|
||||
if ("size" in response){
|
||||
// The response JSON contains size, high likelihood valid response returned
|
||||
ulong uploadFileSize = response["size"].integer;
|
||||
|
||||
// In some cases the file that was uploaded was not complete, but 'completed' without errors on OneDrive
|
||||
|
@ -1813,6 +1815,7 @@ final class SyncEngine
|
|||
saveItem(response);
|
||||
return;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// we are --dry-run - simulate the file upload
|
||||
writeln(" done.");
|
||||
|
|
Loading…
Reference in a new issue