From 1829dcc66cc7b4d183aed2e9675141305ae33bfb Mon Sep 17 00:00:00 2001 From: Alexey Pegov Date: Tue, 24 May 2011 15:45:09 +0400 Subject: [PATCH] IDEA-69940 Reveal log broken [fix2] --- .../src/com/intellij/ide/actions/ShowFilePathAction.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 65ee1e6b5274..9f4699ebd105 100644 --- a/platform/platform-impl/src/com/intellij/ide/actions/ShowFilePathAction.java +++ b/platform/platform-impl/src/com/intellij/ide/actions/ShowFilePathAction.java @@ -184,7 +184,12 @@ public class ShowFilePathAction extends AnAction { args = new String[] {"osascript", "-e", script}; } else { - args = new String[] {"explorer", String.format("/select,\"%s\"", path)}; + if (path.indexOf(' ') >= 0) { + args = new String[]{"explorer", String.format("/select,\"%s\"", path.substring(0, path.indexOf(' '))), + String.format("\"%s\"", path.substring(path.indexOf(' ') + 1))}; + } else { + args = new String[]{"explorer", String.format("/select,\"%s\"", path)}; + } } runtime.exec(args);