Fix "CMD Here" command open Explorer issue

Better specify the cmdline interpreter:
This solves a possible confusion in between the cmdline interpreter and the possible folder named "cmd"' for the ShellExecute WINAPI.

Fix #11818, close #11833
This commit is contained in:
xomx 2022-06-24 00:33:45 +02:00 committed by Don Ho
parent 9d69db9b15
commit 7917d0d974
2 changed files with 3 additions and 2 deletions

View File

@ -6700,7 +6700,7 @@ void NppParameters::createXmlTreeFromGUIParams()
}
// <GUIConfig name="commandLineInterpreter">powershell</GUIConfig>
if (_nppGUI._commandLineInterpreter.compare(TEXT("cmd")))
if (_nppGUI._commandLineInterpreter.compare(CMD_INTERPRETER))
{
TiXmlElement *GUIConfigElement = (newGUIRoot->InsertEndChild(TiXmlElement(TEXT("GUIConfig"))))->ToElement();
GUIConfigElement->SetAttribute(TEXT("name"), TEXT("commandLineInterpreter"));

View File

@ -46,6 +46,7 @@
#endif
#define CMD_INTERPRETER TEXT("%COMSPEC%")
class NativeLangSpeaker;
@ -842,7 +843,7 @@ struct NppGUI final
generic_string _definedSessionExt;
generic_string _definedWorkspaceExt;
generic_string _commandLineInterpreter = TEXT("cmd");
generic_string _commandLineInterpreter = CMD_INTERPRETER;
struct AutoUpdateOptions
{