summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/CloudFile/src/Services/dropbox_service.cpp3
-rw-r--r--plugins/CloudFile/src/Services/google_service.cpp3
-rw-r--r--plugins/CloudFile/src/Services/microsoft_service.cpp3
-rw-r--r--plugins/CloudFile/src/Services/yandex_service.cpp3
-rw-r--r--plugins/CloudFile/src/utils.cpp4
5 files changed, 12 insertions, 4 deletions
diff --git a/plugins/CloudFile/src/Services/dropbox_service.cpp b/plugins/CloudFile/src/Services/dropbox_service.cpp
index 41b72b9de3..bfc5320c98 100644
--- a/plugins/CloudFile/src/Services/dropbox_service.cpp
+++ b/plugins/CloudFile/src/Services/dropbox_service.cpp
@@ -221,7 +221,8 @@ auto CDropboxService::CreateSharedLink(const std::string &path)
void CDropboxService::Upload(FileTransferParam *ftp)
{
- std::string serverFolder = T2Utf(ftp->GetServerDirectory());
+ auto serverDictionary = ftp->GetServerDirectory();
+ std::string serverFolder = serverDictionary ? T2Utf(serverDictionary) : "";
if (!serverFolder.empty()) {
auto path = PreparePath(serverFolder);
auto link = CreateSharedLink(path);
diff --git a/plugins/CloudFile/src/Services/google_service.cpp b/plugins/CloudFile/src/Services/google_service.cpp
index 76821deb2d..26ff2d02c4 100644
--- a/plugins/CloudFile/src/Services/google_service.cpp
+++ b/plugins/CloudFile/src/Services/google_service.cpp
@@ -244,7 +244,8 @@ auto CGDriveService::CreateSharedLink(const std::string &itemId)
void CGDriveService::Upload(FileTransferParam *ftp)
{
std::string folderId;
- std::string serverFolder = T2Utf(ftp->GetServerDirectory());
+ auto serverDictionary = ftp->GetServerDirectory();
+ std::string serverFolder = serverDictionary ? T2Utf(serverDictionary) : "";
if (!serverFolder.empty()) {
folderId = CreateFolder(folderId, serverFolder);
auto link = CreateSharedLink(folderId);
diff --git a/plugins/CloudFile/src/Services/microsoft_service.cpp b/plugins/CloudFile/src/Services/microsoft_service.cpp
index 92a50cbc80..db8acf7cc6 100644
--- a/plugins/CloudFile/src/Services/microsoft_service.cpp
+++ b/plugins/CloudFile/src/Services/microsoft_service.cpp
@@ -211,7 +211,8 @@ auto COneDriveService::CreateSharedLink(const std::string &itemId)
void COneDriveService::Upload(FileTransferParam *ftp)
{
std::string folderId;
- std::string serverFolder = T2Utf(ftp->GetServerDirectory());
+ auto serverDictionary = ftp->GetServerDirectory();
+ std::string serverFolder = serverDictionary ? T2Utf(serverDictionary) : "";
if (!serverFolder.empty()) {
auto path = PreparePath(serverFolder);
folderId = CreateFolder(path);
diff --git a/plugins/CloudFile/src/Services/yandex_service.cpp b/plugins/CloudFile/src/Services/yandex_service.cpp
index cffe82caa2..ff99604aa4 100644
--- a/plugins/CloudFile/src/Services/yandex_service.cpp
+++ b/plugins/CloudFile/src/Services/yandex_service.cpp
@@ -220,7 +220,8 @@ auto CYandexService::CreateSharedLink(const std::string &path)
void CYandexService::Upload(FileTransferParam *ftp)
{
- std::string serverFolder = T2Utf(ftp->GetServerDirectory());
+ auto serverDictionary = ftp->GetServerDirectory();
+ std::string serverFolder = serverDictionary ? T2Utf(serverDictionary) : "";
if (!serverFolder.empty()) {
auto path = PreparePath(serverFolder);
CreateFolder(path);
diff --git a/plugins/CloudFile/src/utils.cpp b/plugins/CloudFile/src/utils.cpp
index ec5bc04d10..4d1ed11fa6 100644
--- a/plugins/CloudFile/src/utils.cpp
+++ b/plugins/CloudFile/src/utils.cpp
@@ -45,6 +45,10 @@ bool CanSendToContact(MCONTACT hContact)
if (!proto)
return false;
+ bool isCtrlPressed = (GetKeyState(VK_CONTROL) & 0x8000) != 0;
+ if (isCtrlPressed)
+ return true;
+
bool canSend = (CallProtoService(proto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IMSEND) != 0;
if (!canSend)
return false;