summaryrefslogtreecommitdiff
path: root/plugins/Dropbox/src
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2014-04-01 07:44:56 +0000
committerAlexander Lantsev <aunsane@gmail.com>2014-04-01 07:44:56 +0000
commitad456be362d02314fa81d67742cf39df55fe287e (patch)
treed1d1a05f414a3b7450dab03b18f737f2c9b5d516 /plugins/Dropbox/src
parent72b7008d4d971d220035532350c49cd8297f5b9b (diff)
Dropbox:
- fixed encoding problem in commands - changed place to secret_key header git-svn-id: http://svn.miranda-ng.org/main/trunk@8809 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Dropbox/src')
-rw-r--r--plugins/Dropbox/src/dropbox.h2
-rw-r--r--plugins/Dropbox/src/dropbox_commands.cpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/plugins/Dropbox/src/dropbox.h b/plugins/Dropbox/src/dropbox.h
index 2b2418e669..5fa5807897 100644
--- a/plugins/Dropbox/src/dropbox.h
+++ b/plugins/Dropbox/src/dropbox.h
@@ -13,7 +13,7 @@
#define DROPBOX_APICONTENT_URL "https://api-content.dropbox.com/" DROPBOX_API_VER
#define DROPBOX_API_KEY "fa8du7gkf2q8xzg"
-#include "..\..\..\Dropbox\secret_key.h"
+#include "..\..\..\private-keys\Dropbox\secret_key.h"
#define DROPBOX_FILE_CHUNK_SIZE 4 * 1024 * 1024 //4 MB
diff --git a/plugins/Dropbox/src/dropbox_commands.cpp b/plugins/Dropbox/src/dropbox_commands.cpp
index 736d1bbdc4..ef0a84b370 100644
--- a/plugins/Dropbox/src/dropbox_commands.cpp
+++ b/plugins/Dropbox/src/dropbox_commands.cpp
@@ -21,7 +21,7 @@ void CDropbox::CommandContent(void *arg)
CMStringA url = DROPBOX_API_URL "/metadata/" DROPBOX_API_ROOT;
if (name)
- url.AppendFormat("/%s", name);
+ url.AppendFormat("/%s", ptrA(mir_utf8encode(name)));
HttpRequest *request = new HttpRequest(param->instance->hNetlibUser, REQUEST_GET, url);
request->AddBearerAuthHeader(db_get_sa(NULL, MODULE, "TokenSecret"));
@@ -78,7 +78,7 @@ void CDropbox::CommandShare(void *arg)
{
CMStringA url = DROPBOX_API_URL "/shares/" DROPBOX_API_ROOT;
if (name)
- url.AppendFormat("/%s", name);
+ url.AppendFormat("/%s", ptrA(mir_utf8encode(name)));
HttpRequest *request = new HttpRequest(param->instance->hNetlibUser, REQUEST_POST, url);
request->AddBearerAuthHeader(db_get_sa(NULL, MODULE, "TokenSecret"));
@@ -122,7 +122,7 @@ void CDropbox::CommandDelete(void *arg)
char *name = (char*)param->data;
if (name)
{
- CMStringA pparam = CMStringA("root=" DROPBOX_API_ROOT "&path=") + name;
+ CMStringA pparam = CMStringA("root=" DROPBOX_API_ROOT "&path=") + ptrA(mir_utf8encode(name));
HttpRequest *request = new HttpRequest(param->instance->hNetlibUser, REQUEST_POST, DROPBOX_API_URL "/fileops/delete");
request->AddBearerAuthHeader(db_get_sa(NULL, MODULE, "TokenSecret"));