diff --git a/PowerEditor/src/NppCommands.cpp b/PowerEditor/src/NppCommands.cpp index 81cbfb97..872c54c1 100644 --- a/PowerEditor/src/NppCommands.cpp +++ b/PowerEditor/src/NppCommands.cpp @@ -90,7 +90,7 @@ void Notepad_plus::command(int id) case IDM_FILE_OPEN_CMD: { - Command cmd(TEXT("cmd /K cd /d $(CURRENT_DIRECTORY)")); + Command cmd(TEXT("cmd /K cd /d \"$(CURRENT_DIRECTORY)\"")); cmd.run(_pPublicInterface->getHSelf()); } break; diff --git a/PowerEditor/src/WinControls/FileBrowser/fileBrowser.cpp b/PowerEditor/src/WinControls/FileBrowser/fileBrowser.cpp index 6f827d48..08924291 100644 --- a/PowerEditor/src/WinControls/FileBrowser/fileBrowser.cpp +++ b/PowerEditor/src/WinControls/FileBrowser/fileBrowser.cpp @@ -688,7 +688,7 @@ void FileBrowser::popupMenuCmd(int cmdID) if (::PathFileExists(path.c_str())) { TCHAR cmdStr[1024]; - wsprintf(cmdStr, TEXT("cmd /K cd /d %s"), path.c_str()); + wsprintf(cmdStr, TEXT("cmd /K cd /d \"%s\""), path.c_str()); Command cmd(cmdStr); cmd.run(nullptr); }