From e5902ec9e578947d8ccbfb1a17dade7a81127abe Mon Sep 17 00:00:00 2001 From: "Maria Odea B. Ching" Date: Thu, 1 Jun 2006 03:16:31 +0000 Subject: [PATCH] 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 --- .../repository/indexing/AbstractRepositoryIndex.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 { -- 2.39.5