Index: src/ch/ch.cpp =================================================================== diff -u -N -r7a096cad617f85582370a1c788c45442d39efc8c -r7c612814a43eb389fa1ac27ccd8f621fd4ff37e8 --- src/ch/ch.cpp (.../ch.cpp) (revision 7a096cad617f85582370a1c788c45442d39efc8c) +++ src/ch/ch.cpp (.../ch.cpp) (revision 7c612814a43eb389fa1ac27ccd8f621fd4ff37e8) @@ -26,7 +26,7 @@ #include "..\common\ipcstructs.h" #include #include "CrashDlg.h" -#include "version.h" +#include "../common/version.h" #ifdef _DEBUG #define new DEBUG_NEW @@ -251,16 +251,20 @@ // load configuration m_cfgSettings.set_callback(ConfigPropertyChangedCallback, NULL); - TCHAR szPath[_MAX_PATH]; - _tcscpy(szPath, GetProgramPath()); - _tcscat(szPath, _T("\\ch.ini")); - try + CString strPath; + // note that the GetProgramDataPath() below should create a directory; ExpandPath() could + // depend on the directory to be created earlier + if(GetProgramDataPath(strPath)) { - m_cfgSettings.read(szPath); + strPath += _T("\\ch.ini"); + try + { + m_cfgSettings.read(strPath); + } + catch(...) + { + } } - catch(...) - { - } // register all properties RegisterProperties(&m_cfgSettings); @@ -270,6 +274,7 @@ ::SetPriorityClass(hProcess, (DWORD)m_cfgSettings.get_signed_num(PP_PPROCESSPRIORITYCLASS)); // set current language + TCHAR szPath[_MAX_PATH]; m_resManager.Init(AfxGetInstanceHandle()); m_resManager.SetCallback((PFNNOTIFYCALLBACK)MainRouter); m_cfgSettings.get_string(PP_PLANGUAGE, szPath, _MAX_PATH); @@ -282,9 +287,6 @@ return FALSE; } - // load crash string just in case - m_strCrashInfo = m_resManager.LoadString(IDS_CRASH_STRING); - // for dialogs CLanguageDialog::SetResManager(&m_resManager);