diff options
Diffstat (limited to 'plugins/CloudFile')
-rw-r--r-- | plugins/CloudFile/src/Services/dropbox_service.cpp | 10 | ||||
-rw-r--r-- | plugins/CloudFile/src/main.cpp | 4 |
2 files changed, 12 insertions, 2 deletions
diff --git a/plugins/CloudFile/src/Services/dropbox_service.cpp b/plugins/CloudFile/src/Services/dropbox_service.cpp index 2d308a28f8..409494e9d3 100644 --- a/plugins/CloudFile/src/Services/dropbox_service.cpp +++ b/plugins/CloudFile/src/Services/dropbox_service.cpp @@ -173,7 +173,15 @@ void CDropboxService::CreateSharedLink(const char *path, char *url) DropboxAPI::CreateSharedLinkRequest shareRequest(token, path); NLHR_PTR response(shareRequest.Send(hConnection)); - HandleHttpError(response); + if (response == NULL) + throw Exception(HttpStatusToError()); + + if (!HTTP_CODE_SUCCESS(response->resultCode) && + response->resultCode != HTTP_CODE_CONFLICT) { + if (response->dataLength) + throw Exception(response->pData); + throw Exception(HttpStatusToError(response->resultCode)); + } JSONNode root = JSONNode::parse(response->pData); if (root.isnull()) diff --git a/plugins/CloudFile/src/main.cpp b/plugins/CloudFile/src/main.cpp index abdc3ba4ec..d3582642cc 100644 --- a/plugins/CloudFile/src/main.cpp +++ b/plugins/CloudFile/src/main.cpp @@ -16,7 +16,9 @@ PLUGININFOEX pluginInfo = __AUTHORWEB, UNICODE_AWARE, // {E876FE63-0701-4CDA-BED5-7C73A379C1D1} - { 0xe876fe63, 0x701, 0x4cda, { 0xbe, 0xd5, 0x7c, 0x73, 0xa3, 0x79, 0xc1, 0xd1 }} + //{ 0xe876fe63, 0x701, 0x4cda, { 0xbe, 0xd5, 0x7c, 0x73, 0xa3, 0x79, 0xc1, 0xd1 }} + // {B908773A-86F7-4A91-8674-6A20BA0E67D1} + { 0xb908773a, 0x86f7, 0x4a91,{ 0x86, 0x74, 0x6a, 0x20, 0xba, 0xe, 0x67, 0xd1 } } }; DWORD WINAPI DllMain(HINSTANCE hInst, DWORD, LPVOID) |