CLOUD: Fix Dropbox and Google Drive UploadRequests
Possible segfault there too.
This commit is contained in:
parent
ab0f2d1a03
commit
1d78d20fcf
2 changed files with 3 additions and 1 deletions
|
@ -56,6 +56,7 @@ void DropboxUploadRequest::start() {
|
||||||
if (!_contentsStream->seek(0)) {
|
if (!_contentsStream->seek(0)) {
|
||||||
warning("DropboxUploadRequest: cannot restart because stream couldn't seek(0)");
|
warning("DropboxUploadRequest: cannot restart because stream couldn't seek(0)");
|
||||||
finishError(Networking::ErrorResponse(this, false, true, "", -1));
|
finishError(Networking::ErrorResponse(this, false, true, "", -1));
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
_ignoreCallback = false;
|
_ignoreCallback = false;
|
||||||
|
|
||||||
|
|
|
@ -50,9 +50,10 @@ GoogleDriveUploadRequest::~GoogleDriveUploadRequest() {
|
||||||
void GoogleDriveUploadRequest::start() {
|
void GoogleDriveUploadRequest::start() {
|
||||||
_ignoreCallback = true;
|
_ignoreCallback = true;
|
||||||
if (_workingRequest) _workingRequest->finish();
|
if (_workingRequest) _workingRequest->finish();
|
||||||
if (!_contentsStream->seek(0)) {
|
if (_contentsStream == nullptr || !_contentsStream->seek(0)) {
|
||||||
warning("GoogleDriveUploadRequest: cannot restart because stream couldn't seek(0)");
|
warning("GoogleDriveUploadRequest: cannot restart because stream couldn't seek(0)");
|
||||||
finishError(Networking::ErrorResponse(this, false, true, "", -1));
|
finishError(Networking::ErrorResponse(this, false, true, "", -1));
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
_resolvedId = ""; //used to update file contents
|
_resolvedId = ""; //used to update file contents
|
||||||
_parentId = ""; //used to create file within parent directory
|
_parentId = ""; //used to create file within parent directory
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue