From 69bdc20d3da8a457b9a6c92e62be5a64d8eaec6e Mon Sep 17 00:00:00 2001 From: Roman Shevchenko Date: Tue, 18 Dec 2012 15:26:39 +0100 Subject: [PATCH] IDEA-97719 (no quoting/escaping is needed for explorer) --- .../com/intellij/ide/actions/ShowFilePathAction.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/ide/actions/ShowFilePathAction.java b/platform/platform-impl/src/com/intellij/ide/actions/ShowFilePathAction.java index d4d735eaa46b..c63c30115647 100644 --- a/platform/platform-impl/src/com/intellij/ide/actions/ShowFilePathAction.java +++ b/platform/platform-impl/src/com/intellij/ide/actions/ShowFilePathAction.java @@ -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; }