summaryrefslogtreecommitdiff
path: root/plugins/Dropbox/src/dropbox_commands.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2016-02-25 15:49:58 +0000
committerAlexander Lantsev <aunsane@gmail.com>2016-02-25 15:49:58 +0000
commit048e1f421b84529aa2b29da09027ce997573afd7 (patch)
tree230bde579a4622d6def27b4961639d3377f9cca3 /plugins/Dropbox/src/dropbox_commands.cpp
parent8bf03133314064ec052873b01647c79b69a5b681 (diff)
Dropbox: reworked files sending
git-svn-id: http://svn.miranda-ng.org/main/trunk@16337 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Dropbox/src/dropbox_commands.cpp')
-rw-r--r--plugins/Dropbox/src/dropbox_commands.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/plugins/Dropbox/src/dropbox_commands.cpp b/plugins/Dropbox/src/dropbox_commands.cpp
index 76c373ae80..b3bfc41da4 100644
--- a/plugins/Dropbox/src/dropbox_commands.cpp
+++ b/plugins/Dropbox/src/dropbox_commands.cpp
@@ -20,8 +20,9 @@ void CDropbox::CommandContent(void *arg)
{
CommandParam *param = (CommandParam*)arg;
- CMStringA path = PreparePath((char*)param->data);
- if (path.IsEmpty()) {
+ char path[MAX_PATH];
+ PreparePath((char*)param->data, path);
+ if (path == NULL) {
CMStringA error(FORMAT, T2Utf(TranslateT("\"%s\" command has invalid parameter.\nUse \"/help\" for more info.")), "/share");
ProtoBroadcastAck(MODULE, param->hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, param->hProcess, 0);
CallContactService(param->instance->GetDefaultContact(), PSR_MESSAGE, 0, (LPARAM)error.GetBuffer());
@@ -66,8 +67,9 @@ void CDropbox::CommandShare(void *arg)
{
CommandParam *param = (CommandParam*)arg;
- CMStringA path = PreparePath((char*)param->data);
- if (path.IsEmpty()) {
+ char path[MAX_PATH];
+ PreparePath((char*)param->data, path);
+ if (path == NULL) {
CMStringA error(FORMAT, T2Utf(TranslateT("\"%s\" command has invalid parameter.\nUse \"/help\" for more info.")), "/share");
ProtoBroadcastAck(MODULE, param->hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, param->hProcess, 0);
CallContactService(param->instance->GetDefaultContact(), PSR_MESSAGE, 0, (LPARAM)error.GetBuffer());
@@ -100,8 +102,9 @@ void CDropbox::CommandDelete(void *arg)
{
CommandParam *param = (CommandParam*)arg;
- CMStringA path = PreparePath((char*)param->data);
- if (path.IsEmpty()) {
+ char path[MAX_PATH];
+ PreparePath((char*)param->data, path);
+ if (path == NULL) {
CMStringA error(FORMAT, T2Utf(TranslateT("\"%s\" command has invalid parameter.\nUse \"/help\" for more info.")), "/delete");
ProtoBroadcastAck(MODULE, param->hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, param->hProcess, 0);
CallContactService(param->instance->GetDefaultContact(), PSR_MESSAGE, 0, (LPARAM)error.GetBuffer());