]> source.dussan.org Git - archiva.git/commitdiff
PR: MRM-112
authorMaria Odea B. Ching <oching@apache.org>
Thu, 1 Jun 2006 03:16:31 +0000 (03:16 +0000)
committerMaria Odea B. Ching <oching@apache.org>
Thu, 1 Jun 2006 03:16:31 +0000 (03:16 +0000)
Added checking if the index directory already exists but is empty, proceed with the indexing.

git-svn-id: https://svn.apache.org/repos/asf/maven/repository-manager/trunk@410722 13f79535-47bb-0310-9956-ffa450edef68

maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/AbstractRepositoryIndex.java

index c6af1d970a3efd997dd367de80cccc21a5afb45e..5efd5ed7d0d396374a751b95640197cd04ee0194 100644 (file)
@@ -254,7 +254,14 @@ public abstract class AbstractRepositoryIndex
         }
         else if ( indexDir.isDirectory() )
         {
-            throw new RepositoryIndexException( indexPath + " is not a valid index directory." );
+            if( indexDir.listFiles().length > 1 )
+            {
+                throw new RepositoryIndexException( indexPath + " is not a valid index directory." );
+            }
+            else
+            {
+                return false;
+            }
         }
         else
         {