Add logging as to why resume upload failed (Issue #468) (#470)

* Log 'why' the resume upload failed
* Remove the 'resume_upload' as it is invalid & contains bad data
This commit is contained in:
abraunegg 2019-04-15 10:56:11 +10:00 committed by GitHub
parent c6923cdf29
commit ea26e4d830
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -83,6 +83,7 @@ struct UploadSession
throw e;
}
}
// do we have a valid response from OneDrive?
if (response.object()){
// JSON object
@ -96,10 +97,18 @@ struct UploadSession
}
} else {
// bad data
log.vlog("Restore file upload session failed - invalid data response from OneDrive");
if (exists(sessionFilePath)) {
remove(sessionFilePath);
}
return false;
}
} else {
// not a JSON object
log.vlog("Restore file upload session failed - invalid response from OneDrive");
if (exists(sessionFilePath)) {
remove(sessionFilePath);
}
return false;
}
return true;