diff options
author | aunsane <aunsane@gmail.com> | 2017-05-10 00:38:42 +0300 |
---|---|---|
committer | aunsane <aunsane@gmail.com> | 2017-05-10 00:38:42 +0300 |
commit | 6cb4fe7726c5672a5b6776d83976ed851d8332c2 (patch) | |
tree | b7464f6d6105d70708d08ddb6d9b5524c3b22832 /plugins/CloudFile/src/Services/microsoft_service.cpp | |
parent | e6b569f5f636c548fa253171f86b7a0f96fe1817 (diff) |
CloudFile: fix "on conflict" fox dropbox
Diffstat (limited to 'plugins/CloudFile/src/Services/microsoft_service.cpp')
-rw-r--r-- | plugins/CloudFile/src/Services/microsoft_service.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/CloudFile/src/Services/microsoft_service.cpp b/plugins/CloudFile/src/Services/microsoft_service.cpp index aa2b8613b4..194d117df8 100644 --- a/plugins/CloudFile/src/Services/microsoft_service.cpp +++ b/plugins/CloudFile/src/Services/microsoft_service.cpp @@ -130,7 +130,7 @@ void COneDriveService::HandleJsonError(JSONNode &node) void COneDriveService::UploadFile(const char *parentId, const char *name, const char *data, size_t size, char *fileId) { ptrA token(db_get_sa(NULL, GetModule(), "TokenSecret")); - BYTE strategy = db_get_b(NULL, MODULE, "ConflictStrategy", OnConflict::NONE); + BYTE strategy = db_get_b(NULL, MODULE, "ConflictStrategy", OnConflict::REPLACE); OneDriveAPI::UploadFileRequest *request = mir_strlen(parentId) ? new OneDriveAPI::UploadFileRequest(token, parentId, name, data, size, (OnConflict)strategy) : new OneDriveAPI::UploadFileRequest(token, name, data, size, (OnConflict)strategy); @@ -145,7 +145,7 @@ void COneDriveService::UploadFile(const char *parentId, const char *name, const void COneDriveService::CreateUploadSession(const char *parentId, const char *name, char *uploadUri) { ptrA token(db_get_sa(NULL, GetModule(), "TokenSecret")); - BYTE strategy = db_get_b(NULL, MODULE, "ConflictStrategy", OnConflict::NONE); + BYTE strategy = db_get_b(NULL, MODULE, "ConflictStrategy", OnConflict::REPLACE); OneDriveAPI::CreateUploadSessionRequest *request = mir_strlen(parentId) ? new OneDriveAPI::CreateUploadSessionRequest(token, parentId, name, (OnConflict)strategy) : new OneDriveAPI::CreateUploadSessionRequest(token, name, (OnConflict)strategy); @@ -241,6 +241,8 @@ UINT COneDriveService::Upload(FileTransferParam *ftp) size_t size = ftp->ReadCurrentFile(chunk, chunkSize); UploadFile(folderId, T2Utf(fileName), chunk, size, fileId); + + ftp->Progress(size); } else { |