From f48fb705b592daa8947cb776420fc0774633b875 Mon Sep 17 00:00:00 2001 From: Eugene Zhuravlev Date: Tue, 1 Mar 2005 17:37:27 +0300 Subject: [PATCH] fix IDEADEV-472 --- .../intellij/compiler/impl/CompileDriver.java | 32 ++++--------------- 1 file changed, 6 insertions(+), 26 deletions(-) diff --git a/source/com/intellij/compiler/impl/CompileDriver.java b/source/com/intellij/compiler/impl/CompileDriver.java index 742c6674896d..743bef400852 100644 --- a/source/com/intellij/compiler/impl/CompileDriver.java +++ b/source/com/intellij/compiler/impl/CompileDriver.java @@ -1360,31 +1360,15 @@ public class CompileDriver { } if (nonExistingOutputPaths.size() > 0) { - StringBuffer paths = new StringBuffer(); for (Iterator it = nonExistingOutputPaths.iterator(); it.hasNext();) { File file = it.next(); - if (paths.length() > 0) { - paths.append(",\n"); + final boolean succeeded = file.mkdirs(); + if (!succeeded) { + Messages.showMessageDialog(myProject, "Failed to create directory " + file.getPath(), "Unable To Create Directory", Messages.getErrorIcon()); + return false; } - paths.append(file.getPath()); } - final String notExistsMessage = (nonExistingOutputPaths.size() > 1 ? - "The following output paths do not exist:\n" : - "The following output path does not exist:\n") + - paths.toString() + - "\n\nWould you like to create" + (nonExistingOutputPaths.size() > 1 ? " them " : " it ") + "and continue?"; - final int answer = Messages.showYesNoDialog(myProject, notExistsMessage, "Output Path Does Not Exist", Messages.getQuestionIcon()); - - if (answer == 0) { // yes - for (Iterator it = nonExistingOutputPaths.iterator(); it.hasNext();) { - File file = it.next(); - final boolean succeeded = file.mkdirs(); - if (!succeeded) { - Messages.showMessageDialog(myProject, "Failed to create directory " + file.getPath(), "Unable To Create Directory", Messages.getErrorIcon()); - return false; - } - } - final Boolean refreshSuccess = ApplicationManager.getApplication().runWriteAction(new Computable() { + final Boolean refreshSuccess = ApplicationManager.getApplication().runWriteAction(new Computable() { public Boolean compute() { for (Iterator it = nonExistingOutputPaths.iterator(); it.hasNext();) { File file = it.next(); @@ -1396,11 +1380,7 @@ public class CompileDriver { return Boolean.TRUE; } }); - if (!refreshSuccess.booleanValue()) { - return false; - } - } - else { + if (!refreshSuccess.booleanValue()) { return false; } }