diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2016-02-26 18:15:28 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2016-02-26 18:15:28 +0000 |
commit | 134773092963feea383ea315604bd1b996cdc6c5 (patch) | |
tree | 95ff0a97ebb7eaffee495e815004ea20f3537c79 /plugins/Dropbox/src/dropbox_transfers.cpp | |
parent | bac49aec1a9a616cd3393048419e68ce176eee5f (diff) |
Dropbox: fixed folder sending
git-svn-id: http://svn.miranda-ng.org/main/trunk@16350 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Dropbox/src/dropbox_transfers.cpp')
-rw-r--r-- | plugins/Dropbox/src/dropbox_transfers.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/plugins/Dropbox/src/dropbox_transfers.cpp b/plugins/Dropbox/src/dropbox_transfers.cpp index 2a0b713ec8..6956bcb3ab 100644 --- a/plugins/Dropbox/src/dropbox_transfers.cpp +++ b/plugins/Dropbox/src/dropbox_transfers.cpp @@ -96,6 +96,14 @@ UINT CDropbox::SendFilesAsync(void *owner, void *arg) FileTransferParam *ftp = (FileTransferParam*)arg;
try {
+ if (ftp->directoryName) {
+ char path[MAX_PATH], url[MAX_PATH];
+ PreparePath(ftp->directoryName, path);
+ instance->CreateFolder(path);
+ instance->CreateDownloadUrl(path, url);
+ ftp->AppendFormatData(_T("%s\r\n"), ptrT(mir_utf8decodeT(url)));
+ }
+
ftp->FirstFile();
do
{
@@ -138,7 +146,7 @@ UINT CDropbox::SendFilesAsync(void *owner, void *arg) if (!_tcschr(fileName, L'\\')) {
char url[MAX_PATH];
instance->CreateDownloadUrl(path, url);
- ftp->AddUrl(url);
+ ftp->AppendFormatData(_T("%s\r\n"), ptrT(mir_utf8decodeT(url)));
}
} while (ftp->NextFile());
}
@@ -159,13 +167,7 @@ UINT CDropbox::SendFilesAndReportAsync(void *owner, void *arg) int res = SendFilesAsync(owner, arg);
if (res == ACKRESULT_SUCCESS)
- {
- CMStringA urls;
- for (int i = 0; i < ftp->urls.getCount(); i++)
- urls.AppendFormat("%s\r\n", ftp->urls[i]);
-
- instance->Report(ftp->hContact, urls.GetBuffer(), ftp->description);
- }
+ instance->Report(ftp->hContact, ftp->data);
instance->transfers.remove(ftp);
delete ftp;
@@ -183,7 +185,7 @@ UINT CDropbox::SendFilesAndEventAsync(void *owner, void *arg) TRANSFERINFO ti = { 0 };
ti.hProcess = ftp->hProcess;
ti.status = res;
- ti.data = ftp->urls.getArray();
+ //ti.data = T2Utf(data);
NotifyEventHooks(instance->hFileSentEventHook, ftp->hContact, (LPARAM)&ti);
|