Create repository directory if it doesn't exist.

git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@510575 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Emmanuel Venisse 2007-02-22 16:16:59 +00:00
parent ee25ad66f2
commit 20f091cfe5
1 changed files with 9 additions and 2 deletions

View File

@ -100,8 +100,15 @@ public class RepositoryServlet
while ( itrepos.hasNext() )
{
RepositoryConfiguration repoConfig = (RepositoryConfiguration) itrepos.next();
DavServerComponent server =
createServer( repoConfig.getUrlName(), new File( repoConfig.getDirectory() ), servletConfig );
File repoDir = new File( repoConfig.getDirectory() );
if ( !repoDir.exists() )
{
repoDir.mkdirs();
}
DavServerComponent server = createServer( repoConfig.getUrlName(), repoDir, servletConfig );
server.addListener( audit );
}
}