summaryrefslogtreecommitdiff
path: root/src/modules/chat/chat_opts.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/chat/chat_opts.cpp')
-rw-r--r--src/modules/chat/chat_opts.cpp19
1 files changed, 1 insertions, 18 deletions
diff --git a/src/modules/chat/chat_opts.cpp b/src/modules/chat/chat_opts.cpp
index 45f179e99b..1565f7efa6 100644
--- a/src/modules/chat/chat_opts.cpp
+++ b/src/modules/chat/chat_opts.cpp
@@ -255,21 +255,7 @@ void LoadGlobalSettings(void)
InitSetting(&g_Settings->pszOutgoingNick, "HeaderOutgoing", _T("%n:"));
InitSetting(&g_Settings->pszHighlightWords, "HighlightWords", _T("%m"));
- TCHAR pszTemp[MAX_PATH];
- DBVARIANT dbv;
- g_Settings->pszLogDir = (TCHAR *)mir_realloc(g_Settings->pszLogDir, MAX_PATH*sizeof(TCHAR));
- if (!db_get_ts(NULL, "Chat", "LogDirectory", &dbv)) {
- lstrcpyn(pszTemp, dbv.ptszVal, MAX_PATH);
- db_free(&dbv);
- }
- else {
- TCHAR *tmpPath = Utils_ReplaceVarsT(_T("%miranda_logpath%\\Chat"));
- lstrcpyn(pszTemp, tmpPath, SIZEOF(pszTemp) - 1);
- mir_free(tmpPath);
- }
-
- PathToAbsoluteT(pszTemp, g_Settings->pszLogDir);
-
+ InitSetting(&g_Settings->pszLogDir, "LogDirectory", _T("%miranda_logpath%\\Chat"));
g_Settings->LogIndentEnabled = (db_get_b(NULL, "Chat", "LogIndentEnabled", 1) != 0) ? TRUE : FALSE;
LOGFONT lf;
@@ -288,9 +274,6 @@ void LoadGlobalSettings(void)
LoadMsgDlgFont(19, &lf, NULL);
g_Settings->UserListHeadingsFont = CreateFontIndirect(&lf);
- if (g_Settings->LoggingEnabled)
- CreateDirectoryTreeT(g_Settings->pszLogDir);
-
SetIndentSize();
}