summaryrefslogtreecommitdiff
path: root/plugins/Dropbox/src/dropbox_utils.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2016-02-27 16:03:20 +0000
committerAlexander Lantsev <aunsane@gmail.com>2016-02-27 16:03:20 +0000
commitce1317d110f70eee0d835ffa3c761168e2f5e9b7 (patch)
treeea290bde0b8761edd76cbdd00393d17586299bae /plugins/Dropbox/src/dropbox_utils.cpp
parent2814cd2a0f6ed89dab0c4dca6b8dbb2c7523bef9 (diff)
Drobpox:
- added search command - fixed other commands git-svn-id: http://svn.miranda-ng.org/main/trunk@16363 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Dropbox/src/dropbox_utils.cpp')
-rw-r--r--plugins/Dropbox/src/dropbox_utils.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/plugins/Dropbox/src/dropbox_utils.cpp b/plugins/Dropbox/src/dropbox_utils.cpp
index 15e97451d2..ee6fc73a60 100644
--- a/plugins/Dropbox/src/dropbox_utils.cpp
+++ b/plugins/Dropbox/src/dropbox_utils.cpp
@@ -2,10 +2,17 @@
char* CDropbox::PreparePath(const char *oldPath, char *newPath)
{
- CMStringA result("/");
- result.Append(oldPath);
- result.Replace("\\", "/");
- mir_strcpy(newPath, result);
+ if (oldPath == NULL)
+ mir_strcpy(newPath, "");
+ else if (*oldPath != '/')
+ {
+ CMStringA result("/");
+ result.Append(oldPath);
+ result.Replace("\\", "/");
+ mir_strcpy(newPath, result);
+ }
+ else
+ mir_strcpy(newPath, oldPath);
return newPath;
}