mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-97719 (no quoting/escaping is needed for explorer)
This commit is contained in:
@@ -226,15 +226,15 @@ public class ShowFilePathAction extends AnAction {
|
||||
|
||||
private static void doOpen(@NotNull final File dir, @Nullable final File toSelect) throws IOException, ExecutionException {
|
||||
if (SystemInfo.isWindows) {
|
||||
final GeneralCommandLine cmd;
|
||||
String cmd;
|
||||
if (toSelect != null) {
|
||||
cmd = new GeneralCommandLine("explorer", "/select,\"" + toSelect.getAbsolutePath() + '"');
|
||||
cmd = "explorer /select," + toSelect.getAbsolutePath();
|
||||
}
|
||||
else {
|
||||
cmd = new GeneralCommandLine("explorer", "/root,\"" + dir.getAbsolutePath() + '"');
|
||||
cmd = "explorer /root," + dir.getAbsolutePath();
|
||||
}
|
||||
cmd.putUserData(GeneralCommandLine.DO_NOT_ESCAPE_QUOTES, true);
|
||||
cmd.createProcess();
|
||||
// no quoting/escaping is needed
|
||||
Runtime.getRuntime().exec(cmd);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user