summaryrefslogtreecommitdiff
path: root/plugins/CloudFile/src/Services/yandex_service.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/CloudFile/src/Services/yandex_service.cpp')
-rw-r--r--plugins/CloudFile/src/Services/yandex_service.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/plugins/CloudFile/src/Services/yandex_service.cpp b/plugins/CloudFile/src/Services/yandex_service.cpp
index ff99604aa4..1f87c14da5 100644
--- a/plugins/CloudFile/src/Services/yandex_service.cpp
+++ b/plugins/CloudFile/src/Services/yandex_service.cpp
@@ -200,7 +200,17 @@ void CYandexService::CreateFolder(const std::string &path)
YandexAPI::CreateFolderRequest request(token, path.c_str());
NLHR_PTR response(request.Send(m_hConnection));
- GetJsonResponse(response);
+ if (HTTP_CODE_SUCCESS(response->resultCode)) {
+ GetJsonResponse(response);
+ return;
+ }
+
+ // forder exists on server
+ if (response->resultCode == HTTP_CODE_CONFLICT) {
+ return;
+ }
+
+ HttpResponseToError(response);
}
auto CYandexService::CreateSharedLink(const std::string &path)