summaryrefslogtreecommitdiff
path: root/plugins/CloudFile/src/cloud_file.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/CloudFile/src/cloud_file.cpp')
-rw-r--r--plugins/CloudFile/src/cloud_file.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/plugins/CloudFile/src/cloud_file.cpp b/plugins/CloudFile/src/cloud_file.cpp
index ed265f71aa..9e40ac3db0 100644
--- a/plugins/CloudFile/src/cloud_file.cpp
+++ b/plugins/CloudFile/src/cloud_file.cpp
@@ -70,19 +70,17 @@ void CCloudService::Report(MCONTACT hContact, const wchar_t *data)
PasteToClipboard(data);
}
-char* CCloudService::PreparePath(const char *oldPath, char *newPath)
+const char* CCloudService::PreparePath(const char *oldPath, CMStringA &newPath)
{
if (oldPath == nullptr)
- mir_strcpy(newPath, "");
- else if (*oldPath != '/')
- {
- CMStringA result("/");
- result.Append(oldPath);
- result.Replace("\\", "/");
- mir_strcpy(newPath, result);
+ newPath = "";
+ else if (*oldPath != '/') {
+ newPath = "/";
+ newPath.Append(oldPath);
+ newPath.Replace("\\", "/");
}
- else
- mir_strcpy(newPath, oldPath);
+ else newPath = oldPath;
+
return newPath;
}