mirror of
https://github.com/cmderdev/cmder.git
synced 2024-11-14 07:29:12 +08:00
Merge pull request #427 from kodybrown/development
Added code to check for the existence of a customized ini file..
This commit is contained in:
commit
9a1d49bfc3
@ -113,8 +113,21 @@ void StartCmder(std::wstring path, bool is_single_mode)
|
|||||||
PathRemoveFileSpec(exeDir);
|
PathRemoveFileSpec(exeDir);
|
||||||
|
|
||||||
PathCombine(icoPath, exeDir, L"icons\\cmder.ico");
|
PathCombine(icoPath, exeDir, L"icons\\cmder.ico");
|
||||||
|
|
||||||
|
// Check for machine-specific config file.
|
||||||
|
PathCombine(oldCfgPath, exeDir, L"config\\ConEmu-%COMPUTERNAME%.xml");
|
||||||
|
ExpandEnvironmentStrings(oldCfgPath, oldCfgPath, sizeof(oldCfgPath) / sizeof(oldCfgPath[0]));
|
||||||
|
if (!PathFileExists(oldCfgPath)) {
|
||||||
PathCombine(oldCfgPath, exeDir, L"config\\ConEmu.xml");
|
PathCombine(oldCfgPath, exeDir, L"config\\ConEmu.xml");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check for machine-specific config file.
|
||||||
|
PathCombine(cfgPath, exeDir, L"vendor\\conemu-maximus5\\ConEmu-%COMPUTERNAME%.xml");
|
||||||
|
ExpandEnvironmentStrings(cfgPath, cfgPath, sizeof(cfgPath) / sizeof(cfgPath[0]));
|
||||||
|
if (!PathFileExists(cfgPath)) {
|
||||||
PathCombine(cfgPath, exeDir, L"vendor\\conemu-maximus5\\ConEmu.xml");
|
PathCombine(cfgPath, exeDir, L"vendor\\conemu-maximus5\\ConEmu.xml");
|
||||||
|
}
|
||||||
|
|
||||||
PathCombine(conEmuPath, exeDir, L"vendor\\conemu-maximus5\\ConEmu.exe");
|
PathCombine(conEmuPath, exeDir, L"vendor\\conemu-maximus5\\ConEmu.exe");
|
||||||
|
|
||||||
if (FileExists(oldCfgPath) && !FileExists(cfgPath))
|
if (FileExists(oldCfgPath) && !FileExists(cfgPath))
|
||||||
|
Loading…
Reference in New Issue
Block a user