From 2728f363024187ad03d0bb525bbc37a8e6bb31cd Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Mon, 25 Sep 2023 11:44:09 -0400 Subject: [PATCH] fix --- launcher/src/CmderLauncher.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/launcher/src/CmderLauncher.cpp b/launcher/src/CmderLauncher.cpp index ea8ccc0..1db1791 100644 --- a/launcher/src/CmderLauncher.cpp +++ b/launcher/src/CmderLauncher.cpp @@ -624,11 +624,11 @@ void RegisterShellMenu(std::wstring opt, wchar_t* keyBaseName, std::wstring cfgR wchar_t commandStr[MAX_PATH + 20] = { 0 }; wchar_t baseCommandStr[MAX_PATH + 20] = { 0 }; - if (!single) { - swprintf_s(baseCommandStr, L"\"%s\"", exePath); + if (single && !PathFileExists(windowsTerminalDir)) { + swprintf_s(baseCommandStr, L"\"%s\" /single", exePath); } else { - swprintf_s(baseCommandStr, L"\"%s\" /single", exePath); + swprintf_s(baseCommandStr, L"\"%s\"", exePath); } if (cfgRoot.length() == 0) // '/c [path]' was NOT specified @@ -756,7 +756,7 @@ cmderOptions GetOption() cmderOptions.cmderIcon = szArgList[i + 1]; i++; } - else if (_wcsicmp(L"/single", szArgList[i]) == 0 && !PathFileExists(windowsTerminalDir)) { + else if (_wcsicmp(L"/single", szArgList[i]) == 0 && !PathFileExists(windowsTerminalDir)) { cmderOptions.cmderSingle = true; }