directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r949384 - /directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/DefaultDirectoryServiceFactory.java
Date Sat, 29 May 2010 12:42:09 GMT
Author: elecharny
Date: Sat May 29 12:42:09 2010
New Revision: 949384

URL: http://svn.apache.org/viewvc?rev=949384&view=rev
Log:
Added a try...catch to avoid some potential failure if some file don't exists anymore.

Modified:
    directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/DefaultDirectoryServiceFactory.java

Modified: directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/DefaultDirectoryServiceFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/DefaultDirectoryServiceFactory.java?rev=949384&r1=949383&r2=949384&view=diff
==============================================================================
--- directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/DefaultDirectoryServiceFactory.java
(original)
+++ directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/DefaultDirectoryServiceFactory.java
Sat May 29 12:42:09 2010
@@ -20,6 +20,7 @@ package org.apache.directory.server.core
 
 
 import java.io.File;
+import java.io.IOException;
 import java.util.List;
 
 import org.apache.commons.io.FileUtils;
@@ -209,7 +210,15 @@ public class DefaultDirectoryServiceFact
         // remaining data from a previous run
         String workingDirectoryPath = directoryService.getWorkingDirectory().getPath();
         File workingDirectory = new File( workingDirectoryPath );
-        FileUtils.deleteDirectory( workingDirectory );
+
+        try
+        {
+            FileUtils.deleteDirectory( workingDirectory );
+        }
+        catch ( IOException ioe )
+        {
+            // Ok, not a big deal.
+        }
 
         // Init the service now
         initSchema();



Mime
View raw message