summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/stdmsg/src/chat_window.cpp14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/core/stdmsg/src/chat_window.cpp b/src/core/stdmsg/src/chat_window.cpp
index 911c2deef9..b10330eb3b 100644
--- a/src/core/stdmsg/src/chat_window.cpp
+++ b/src/core/stdmsg/src/chat_window.cpp
@@ -2320,18 +2320,8 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
case IDC_HISTORY:
if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_HISTORY))) {
MODULEINFO *pInfo = pci->MM_FindModule(si->pszModule);
- if (pInfo) {
- wchar_t szFile[MAX_PATH], szName[MAX_PATH], szFolder[MAX_PATH];
- wcsncpy_s(szName, (pInfo->ptszModDispName ? pInfo->ptszModDispName : _A2T(si->pszModule)), _TRUNCATE);
- ValidateFilename(szName);
-
- mir_snwprintf(szFolder, L"%s\\%s", g_Settings.pszLogDir, szName);
- mir_snwprintf(szName, L"%s.log", si->ptszID);
- ValidateFilename(szName);
-
- mir_snwprintf(szFile, L"%s\\%s", szFolder, szName);
- ShellExecute(hwndDlg, L"open", szFile, NULL, NULL, SW_SHOW);
- }
+ if (pInfo)
+ ShellExecute(hwndDlg, NULL, pci->GetChatLogsFilename(si, 0), NULL, NULL, SW_SHOW);
}
break;