mirror of
https://github.com/cmderdev/cmder.git
synced 2025-06-15 14:17:50 +08:00
Merge branch 'origin-development-dax' into cmder4win
This commit is contained in:
@ -299,8 +299,8 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr
|
||||
// Set path to Cmder user ConEmu config file
|
||||
PathCombine(userCfgPath, userConfigDirPath, L"user-ConEmu.xml");
|
||||
}
|
||||
|
||||
if ( PathFileExists(cpuCfgPath) || use_user_cfg == false ) // config/[cpu specific terminal emulator config] file exists or /m was specified on command line, use machine specific config.
|
||||
|
||||
if (wcscmp(cpuCfgPath, L"") != 0 && (PathFileExists(cpuCfgPath) || use_user_cfg == false)) // config/[host specific terminal emulator config] file exists or /m was specified on command line, use machine specific config.
|
||||
{
|
||||
if (cfgRoot.length() == 0) // '/c [path]' was NOT specified
|
||||
{
|
||||
@ -325,7 +325,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr
|
||||
}
|
||||
}
|
||||
}
|
||||
else // [terminal emulator config] file does not exist, copy config/[cpu specific terminal emulator config] file to [terminal emulator config] file
|
||||
else // [terminal emulator config] file does not exist, copy config/[host specific terminal emulator config] file to [terminal emulator config] file
|
||||
{
|
||||
if (!CopyFile(cpuCfgPath, cfgPath, FALSE))
|
||||
{
|
||||
@ -348,7 +348,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (PathFileExists(userCfgPath)) // config/user[terminal emulator config] file exists, use it.
|
||||
else if (wcscmp(userCfgPath, L"") != 0 && PathFileExists(userCfgPath)) // config/user[terminal emulator config] file exists, use it.
|
||||
{
|
||||
if (cfgRoot.length() == 0) // '/c [path]' was NOT specified
|
||||
{
|
||||
@ -451,12 +451,12 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr
|
||||
{
|
||||
MessageBox(NULL,
|
||||
(GetLastError() == ERROR_ACCESS_DENIED)
|
||||
? L"Failed to copy vendor/ConEmu.xml.default file to vendor/conemu-maximus5/ConEmu.xml! Access Denied."
|
||||
? L"Failed to copy vendor/ConEmu.xml.default file to vendor/conemu-maximus5/ConEmu.xml! Access Denied."
|
||||
: L"Failed to copy vendor/ConEmu.xml.default file to vendor/conemu-maximus5/ConEmu.xml!", MB_TITLE, MB_ICONSTOP);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
else if (PathFileExists(cfgPath)) // This is a first time Cmder.exe run and [terminal emulator config] file exists, copy [terminal emulator config] file to config/user_[terminal emulator config] file.
|
||||
else if (wcscmp(cfgPath, L"") != 0 && PathFileExists(cfgPath)) // This is a first time Cmder.exe run and [terminal emulator config] file exists, copy [terminal emulator config] file to config/user_[terminal emulator config] file.
|
||||
{
|
||||
if (!CopyFile(cfgPath, userCfgPath, FALSE))
|
||||
{
|
||||
@ -480,9 +480,9 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr
|
||||
|
||||
PathCombine(userConEmuCfgPath, userConfigDirPath, L"user-ConEmu.xml");
|
||||
}
|
||||
else if (wcscmp(defaultCfgPath, L"") == 0) // '/c [path]' was specified and 'vendor/[terminal emulator config].default' config exists, copy Cmder 'vendor/[terminal emulator config].default' file to '[user specified path]/config/user_[terminal emulator config]'.
|
||||
else if (wcscmp(defaultCfgPath, L"") != 0) // '/c [path]' was specified and 'vendor/[terminal emulator config].default' config exists, copy Cmder 'vendor/[terminal emulator config].default' file to '[user specified path]/config/user_[terminal emulator config]'.
|
||||
{
|
||||
if (!CopyFile(defaultCfgPath, userCfgPath, FALSE))
|
||||
if ( ! CopyFile(defaultCfgPath, userCfgPath, FALSE))
|
||||
{
|
||||
if (PathFileExists(windowsTerminalDir))
|
||||
{
|
||||
|
@ -1,9 +1,8 @@
|
||||
|
||||
/**
|
||||
* WARNING: do NOT modify this file! the content of this file should be
|
||||
* automatically generated before AppVeyor builds using the
|
||||
* respective .ps1 Powershell scripts.
|
||||
*
|
||||
* WARNING: This file should NOT be manually modified!
|
||||
* The contents will be automatically generated using the `.ps1` PowerShell scripts,
|
||||
* during builds by the CI.
|
||||
*/
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
Reference in New Issue
Block a user