Merge branch 'fix_launcher_overwrite-2' into development-dax

* fix_launcher_overwrite-2:
  cleanup
  cleanup
  cleanup
  not set
This commit is contained in:
Dax T. Games
2025-01-01 23:26:11 -05:00

View File

@@ -300,7 +300,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr
PathCombine(userCfgPath, userConfigDirPath, L"user-ConEmu.xml"); PathCombine(userCfgPath, userConfigDirPath, L"user-ConEmu.xml");
} }
if ( 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 (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 if (cfgRoot.length() == 0) // '/c [path]' was NOT specified
{ {
@@ -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 if (cfgRoot.length() == 0) // '/c [path]' was NOT specified
{ {
@@ -452,7 +452,7 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr
exit(1); 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)) if (!CopyFile(cfgPath, userCfgPath, FALSE))
{ {
@@ -475,9 +475,9 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr
PathCombine(userConEmuCfgPath, userConfigDirPath, L"user-ConEmu.xml"); 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)) { if (PathFileExists(windowsTerminalDir)) {
MessageBox(NULL, MessageBox(NULL,