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
This commit is contained in:
Maria Odea B. Ching 2006-06-01 03:16:31 +00:00
parent 9b278ded3b
commit e5902ec9e5
1 changed files with 8 additions and 1 deletions

View File

@ -253,10 +253,17 @@ public abstract class AbstractRepositoryIndex
return false; return false;
} }
else if ( indexDir.isDirectory() ) else if ( indexDir.isDirectory() )
{
if( indexDir.listFiles().length > 1 )
{ {
throw new RepositoryIndexException( indexPath + " is not a valid index directory." ); throw new RepositoryIndexException( indexPath + " is not a valid index directory." );
} }
else else
{
return false;
}
}
else
{ {
throw new RepositoryIndexException( indexPath + " is not a directory." ); throw new RepositoryIndexException( indexPath + " is not a directory." );
} }