added backup of ConEmu.xml to ./config folder at cmder launch if it exists

This commit is contained in:
Dax Games 2016-10-02 22:16:22 -05:00
parent 66c6d5bbb3
commit abd7db99b6

View File

@ -158,6 +158,16 @@ void StartCmder(std::wstring path, bool is_single_mode)
exit(1);
}
}
else {
if (!CopyFile(cfgPath, oldCfgPath, FALSE))
{
MessageBox(NULL,
(GetLastError() == ERROR_ACCESS_DENIED)
? L"Failed to backup ConEmu.xml file to ./config folder!"
: L"Failed to backup ConEmu.xml file to ./config folder!", MB_TITLE, MB_ICONSTOP);
exit(1);
}
}
if (is_single_mode)
{