summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/stdfile/src/file.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/core/stdfile/src/file.cpp b/src/core/stdfile/src/file.cpp
index 4bda297d0c..abe3152cdd 100644
--- a/src/core/stdfile/src/file.cpp
+++ b/src/core/stdfile/src/file.cpp
@@ -73,12 +73,20 @@ static INT_PTR GetReceivedFilesFolder(WPARAM wParam, LPARAM lParam)
{
wchar_t buf[MAX_PATH];
GetContactReceivedFilesDir(wParam, buf, MAX_PATH, TRUE);
- char* dir = mir_u2a(buf);
- mir_strncpy((char*)lParam, dir, MAX_PATH);
+ char *dir = mir_u2a(buf);
+ mir_strncpy((char *)lParam, dir, MAX_PATH);
mir_free(dir);
return 0;
}
+static INT_PTR GetReceivedFilesFolderW(WPARAM wParam, LPARAM lParam)
+{
+ wchar_t buf[MAX_PATH];
+ GetContactReceivedFilesDir(wParam, buf, MAX_PATH, TRUE);
+ mir_wstrncpy((wchar_t *)lParam, buf, MAX_PATH);
+ return 0;
+}
+
static INT_PTR RecvFileCommand(WPARAM, LPARAM lParam)
{
LaunchRecvDialog((CLISTEVENT *)lParam);
@@ -427,6 +435,7 @@ int LoadSendRecvFileModule(void)
CreateServiceFunction(MS_FILE_SENDSPECIFICFILES, SendSpecificFiles);
CreateServiceFunction(MS_FILE_SENDSPECIFICFILEST, SendSpecificFilesT);
CreateServiceFunction(MS_FILE_GETRECEIVEDFILESFOLDER, GetReceivedFilesFolder);
+ CreateServiceFunction(MS_FILE_GETRECEIVEDFILESFOLDERW, GetReceivedFilesFolderW);
CreateServiceFunction("SRFile/RecvFile", RecvFileCommand);
CreateServiceFunction("SRFile/OpenContRecDir", openContRecDir);