diff options
Diffstat (limited to 'plugins/CloudFile/src/Services')
4 files changed, 4 insertions, 6 deletions
diff --git a/plugins/CloudFile/src/Services/dropbox_service.cpp b/plugins/CloudFile/src/Services/dropbox_service.cpp index bfc5320c98..8eadbc4e4c 100644 --- a/plugins/CloudFile/src/Services/dropbox_service.cpp +++ b/plugins/CloudFile/src/Services/dropbox_service.cpp @@ -225,6 +225,7 @@ void CDropboxService::Upload(FileTransferParam *ftp) std::string serverFolder = serverDictionary ? T2Utf(serverDictionary) : ""; if (!serverFolder.empty()) { auto path = PreparePath(serverFolder); + CreateFolder(path); auto link = CreateSharedLink(path); ftp->AddSharedLink(link.c_str()); } diff --git a/plugins/CloudFile/src/Services/google_service.cpp b/plugins/CloudFile/src/Services/google_service.cpp index 26ff2d02c4..c9fbb45c1c 100644 --- a/plugins/CloudFile/src/Services/google_service.cpp +++ b/plugins/CloudFile/src/Services/google_service.cpp @@ -243,7 +243,7 @@ auto CGDriveService::CreateSharedLink(const std::string &itemId) void CGDriveService::Upload(FileTransferParam *ftp) { - std::string folderId; + std::string folderId = "root"; auto serverDictionary = ftp->GetServerDirectory(); std::string serverFolder = serverDictionary ? T2Utf(serverDictionary) : ""; if (!serverFolder.empty()) { diff --git a/plugins/CloudFile/src/Services/microsoft_service.cpp b/plugins/CloudFile/src/Services/microsoft_service.cpp index db8acf7cc6..2843e66d0f 100644 --- a/plugins/CloudFile/src/Services/microsoft_service.cpp +++ b/plugins/CloudFile/src/Services/microsoft_service.cpp @@ -214,10 +214,8 @@ void COneDriveService::Upload(FileTransferParam *ftp) auto serverDictionary = ftp->GetServerDirectory(); std::string serverFolder = serverDictionary ? T2Utf(serverDictionary) : ""; if (!serverFolder.empty()) { - auto path = PreparePath(serverFolder); - folderId = CreateFolder(path); - - auto link = CreateSharedLink(path); + folderId = CreateFolder(serverFolder); + auto link = CreateSharedLink(folderId); ftp->AddSharedLink(link.c_str()); } diff --git a/plugins/CloudFile/src/Services/yandex_service.cpp b/plugins/CloudFile/src/Services/yandex_service.cpp index 1f87c14da5..f1082a6899 100644 --- a/plugins/CloudFile/src/Services/yandex_service.cpp +++ b/plugins/CloudFile/src/Services/yandex_service.cpp @@ -235,7 +235,6 @@ void CYandexService::Upload(FileTransferParam *ftp) if (!serverFolder.empty()) { auto path = PreparePath(serverFolder); CreateFolder(path); - auto link = CreateSharedLink(path); ftp->AddSharedLink(link.c_str()); } |