From: Maria Odea B. Ching Date: Thu, 1 Jun 2006 03:16:31 +0000 (+0000) Subject: PR: MRM-112 X-Git-Tag: archiva-0.9-alpha-1~862 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e5902ec9e578947d8ccbfb1a17dade7a81127abe;p=archiva.git PR: MRM-112 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 --- diff --git a/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/AbstractRepositoryIndex.java b/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/AbstractRepositoryIndex.java index c6af1d970..5efd5ed7d 100644 --- a/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/AbstractRepositoryIndex.java +++ b/maven-repository-indexer/src/main/java/org/apache/maven/repository/indexing/AbstractRepositoryIndex.java @@ -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 {