From 187156487e075be59bd892c82652a319bf6dfda3 Mon Sep 17 00:00:00 2001 From: Kody Brown Date: Tue, 17 Mar 2015 14:39:27 -0600 Subject: [PATCH] Added code to check for the existence of a customized ini file named `ConEmu-%COMPUTERNAME%.ini`, before checking for the standard ini file `ConEmu.ini`. --- launcher/src/CmderLauncher.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/launcher/src/CmderLauncher.cpp b/launcher/src/CmderLauncher.cpp index 893e33c..1aa720f 100644 --- a/launcher/src/CmderLauncher.cpp +++ b/launcher/src/CmderLauncher.cpp @@ -99,7 +99,11 @@ void StartCmder(std::wstring path, bool is_single_mode) PathRemoveFileSpec(exeDir); PathCombine(icoPath, exeDir, L"icons\\cmder.ico"); - PathCombine(cfgPath, exeDir, L"config\\ConEmu.xml"); + PathCombine(cfgPath, exeDir, L"config\\ConEmu-%COMPUTERNAME%.xml"); + ExpandEnvironmentStrings(cfgPath, cfgPath, sizeof(cfgPath) / sizeof(cfgPath[0])); + if (!PathFileExists(cfgPath)) { + PathCombine(cfgPath, exeDir, L"config\\ConEmu.xml"); + } PathCombine(conEmuPath, exeDir, L"vendor\\conemu-maximus5\\ConEmu.exe"); if (is_single_mode)