Only try and create the dir if it doesn't already exist
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 7 Aug 2011 10:37:16 +0000 (10:37 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 7 Aug 2011 10:37:16 +0000 (10:37 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1154689 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/juli/FileHandler.java

index 0faff81..d5fd6e2 100644 (file)
@@ -363,7 +363,7 @@ public class FileHandler
 
         // Create the directory if necessary
         File dir = new File(directory);
-        if (!dir.mkdirs()) {
+        if (!dir.exists() && !dir.mkdirs()) {
             reportError("Unable to create [" + dir + "]", null,
                     ErrorManager.OPEN_FAILURE);
             writer = null;