You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by ag...@apache.org on 2006/10/02 23:56:42 UTC
svn commit: r452239 -
/incubator/roller/trunk/src/org/apache/roller/business/FileManagerImpl.java
Author: agilliland
Date: Mon Oct 2 14:56:41 2006
New Revision: 452239
URL: http://svn.apache.org/viewvc?view=rev&rev=452239
Log:
don't fail if trying to create a directory that already exists.
Modified:
incubator/roller/trunk/src/org/apache/roller/business/FileManagerImpl.java
Modified: incubator/roller/trunk/src/org/apache/roller/business/FileManagerImpl.java
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/src/org/apache/roller/business/FileManagerImpl.java?view=diff&rev=452239&r1=452238&r2=452239
==============================================================================
--- incubator/roller/trunk/src/org/apache/roller/business/FileManagerImpl.java (original)
+++ incubator/roller/trunk/src/org/apache/roller/business/FileManagerImpl.java Mon Oct 2 14:56:41 2006
@@ -161,6 +161,12 @@
// now construct path to new directory
File dir = new File(uploadDir.getAbsolutePath() + File.separator + path);
+ // check if it already exists
+ if(dir.exists() && dir.isDirectory() && dir.canRead()) {
+ // already exists, we don't need to do anything
+ return;
+ }
+
// create it
if(!dir.mkdir()) {
// failed for some reason