From: markt Date: Sun, 7 Aug 2011 10:37:16 +0000 (+0000) Subject: Only try and create the dir if it doesn't already exist X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=e8812c64b20e7118b0786ef0fe76a8d13ba4d4b5;p=tomcat7.0 Only try and create the dir if it doesn't already exist git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1154689 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/juli/FileHandler.java b/java/org/apache/juli/FileHandler.java index 0faff81a3..d5fd6e2ad 100644 --- a/java/org/apache/juli/FileHandler.java +++ b/java/org/apache/juli/FileHandler.java @@ -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;