mirror of
https://github.com/abraunegg/onedrive
synced 2024-05-18 21:56:43 +02:00
* Log 'why' the resume upload failed * Remove the 'resume_upload' as it is invalid & contains bad data
This commit is contained in:
parent
c6923cdf29
commit
ea26e4d830
|
@ -83,6 +83,7 @@ struct UploadSession
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// do we have a valid response from OneDrive?
|
// do we have a valid response from OneDrive?
|
||||||
if (response.object()){
|
if (response.object()){
|
||||||
// JSON object
|
// JSON object
|
||||||
|
@ -96,10 +97,18 @@ struct UploadSession
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// bad data
|
// bad data
|
||||||
|
log.vlog("Restore file upload session failed - invalid data response from OneDrive");
|
||||||
|
if (exists(sessionFilePath)) {
|
||||||
|
remove(sessionFilePath);
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// not a JSON object
|
// not a JSON object
|
||||||
|
log.vlog("Restore file upload session failed - invalid response from OneDrive");
|
||||||
|
if (exists(sessionFilePath)) {
|
||||||
|
remove(sessionFilePath);
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue