Make open Explorer with expeacted path in Folder as workspace

Fix #5981, close #7562
pull/7613/head
Rajendra Singh 5 years ago committed by Don HO
parent 8cbf3c7e29
commit 9e37a167f9
No known key found for this signature in database
GPG Key ID: 6C429F1D8D84F46E

@ -675,8 +675,11 @@ void FileBrowser::popupMenuCmd(int cmdID)
generic_string path = getNodePath(selectedNode); generic_string path = getNodePath(selectedNode);
if (::PathFileExists(path.c_str())) if (::PathFileExists(path.c_str()))
{ {
TCHAR cmdStr[1024]; TCHAR cmdStr[1024] = {};
wsprintf(cmdStr, TEXT("explorer /select,\"%s\""), path.c_str()); if (getNodeType(selectedNode) == browserNodeType_file)
wsprintf(cmdStr, TEXT("explorer /select,\"%s\""), path.c_str());
else
wsprintf(cmdStr, TEXT("explorer \"%s\""), path.c_str());
Command cmd(cmdStr); Command cmd(cmdStr);
cmd.run(nullptr); cmd.run(nullptr);
} }

Loading…
Cancel
Save