mirror of
https://github.com/cmderdev/cmder.git
synced 2024-11-10 09:49:12 +08:00
added /c [path] use vendored conemu.xml as a default starting point if it exists
This commit is contained in:
parent
e17b04cbb9
commit
8c0817941e
@ -295,7 +295,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr
|
|||||||
: L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/user-conemu.xml!", MB_TITLE, MB_ICONSTOP);
|
: L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/user-conemu.xml!", MB_TITLE, MB_ICONSTOP);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
else // vendor/ConEmu.xml config exists, copy Cmder vendor/ConEmu.xml.default file to vendor/conemu-maximus5/ConEmu.xml.
|
else // vendor/ConEmu.xml.default config exists, copy Cmder vendor/ConEmu.xml.default file to vendor/conemu-maximus5/ConEmu.xml.
|
||||||
{
|
{
|
||||||
if (!CopyFile(defaultCfgPath, cfgPath, FALSE))
|
if (!CopyFile(defaultCfgPath, cfgPath, FALSE))
|
||||||
{
|
{
|
||||||
@ -308,6 +308,19 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (PathFileExists(cfgPath)) // vendor/conemu-maximus5/ConEmu.xml exists, copy vendor/conemu-maximus5/ConEmu.xml to config/user_conemu.xml
|
||||||
|
{
|
||||||
|
if (!CopyFile(cfgPath, userCfgPath, FALSE))
|
||||||
|
{
|
||||||
|
MessageBox(NULL,
|
||||||
|
(GetLastError() == ERROR_ACCESS_DENIED)
|
||||||
|
? L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/user-conemu.xml! Access Denied."
|
||||||
|
: L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/user-conemu.xml!", MB_TITLE, MB_ICONSTOP);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
PathCombine(userConEmuCfgPath, userConfigDirPath, L"user-ConEmu.xml");
|
||||||
|
}
|
||||||
else // '-C [PATH]' was specified and 'vendor/ConEmu.xml.default' config exists, copy Cmder 'vendor/ConEmu.xml.default' file to '[user specified path]/config/user_ConEmu.xml'.
|
else // '-C [PATH]' was specified and 'vendor/ConEmu.xml.default' config exists, copy Cmder 'vendor/ConEmu.xml.default' file to '[user specified path]/config/user_ConEmu.xml'.
|
||||||
{
|
{
|
||||||
if ( ! CopyFile(defaultCfgPath, userCfgPath, FALSE))
|
if ( ! CopyFile(defaultCfgPath, userCfgPath, FALSE))
|
||||||
|
Loading…
Reference in New Issue
Block a user