summaryrefslogtreecommitdiff
path: root/plugins/Dropbox/src/file_transfer.h
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Dropbox/src/file_transfer.h')
-rw-r--r--plugins/Dropbox/src/file_transfer.h25
1 files changed, 11 insertions, 14 deletions
diff --git a/plugins/Dropbox/src/file_transfer.h b/plugins/Dropbox/src/file_transfer.h
index 8e8a8af8c2..fed277289c 100644
--- a/plugins/Dropbox/src/file_transfer.h
+++ b/plugins/Dropbox/src/file_transfer.h
@@ -12,7 +12,7 @@ private:
bool isTerminated;
- const TCHAR* directoryName;
+ const TCHAR* folderName;
int relativePathStart;
CMString serverPath;
@@ -27,7 +27,7 @@ public:
isTerminated = false;
- directoryName = NULL;
+ folderName = NULL;
relativePathStart = 0;
pfts.cbSize = sizeof(this->pfts);
@@ -90,18 +90,10 @@ public:
void SetWorkingDirectory(const TCHAR *path)
{
relativePathStart = _tcsrchr(path, '\\') - path + 1;
- /*if (PathIsDirectory(path))
- {
- size_t length = mir_tstrlen(path) + 1;
- pfts.tszWorkingDir = (TCHAR*)mir_calloc(sizeof(TCHAR) * length);
- mir_tstrncpy(pfts.tszWorkingDir, path, length);
- directoryName = _tcsrchr(pfts.tszWorkingDir, '\\') + 1;
- }
- else
- {*/
- pfts.tszWorkingDir = (TCHAR*)mir_calloc(sizeof(TCHAR) * relativePathStart);
- mir_tstrncpy(pfts.tszWorkingDir, path, relativePathStart);
- //}
+ pfts.tszWorkingDir = (TCHAR*)mir_calloc(sizeof(TCHAR) * relativePathStart);
+ mir_tstrncpy(pfts.tszWorkingDir, path, relativePathStart);
+ if (PathIsDirectory(path))
+ folderName = _tcsrchr(path, '\\') + 1;
}
void SetServerPath(const TCHAR *path)
@@ -117,6 +109,11 @@ public:
return serverPath;
}
+ const TCHAR* GetFolderName() const
+ {
+ return folderName;
+ }
+
void AddFile(const TCHAR *path)
{
pfts.ptszFiles = (TCHAR**)mir_realloc(pfts.ptszFiles, sizeof(TCHAR*) * (pfts.totalFiles + 2));