From e21b7c0709d3e8285bb6e94dc400684ef8a8bf36 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 27 Feb 2023 18:49:12 +0300 Subject: =?UTF-8?q?fixes=20#3334=20(NewStory:=20=D0=BA=D0=BB=D0=B8=D0=BA?= =?UTF-8?q?=D0=B0=D0=B1=D0=B5=D0=BB=D1=8C=D0=BD=D1=8B=D0=B5=20=D1=84=D0=B0?= =?UTF-8?q?=D0=B9=D0=BB=D1=82=D1=80=D0=B0=D0=BD=D1=81=D1=84=D0=B5=D1=80?= =?UTF-8?q?=D1=8B)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/stdfile/src/file.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src') 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); -- cgit v1.2.3