]> source.dussan.org Git - archiva.git/commitdiff
Create repository directory if it doesn't exist.
authorEmmanuel Venisse <evenisse@apache.org>
Thu, 22 Feb 2007 16:16:59 +0000 (16:16 +0000)
committerEmmanuel Venisse <evenisse@apache.org>
Thu, 22 Feb 2007 16:16:59 +0000 (16:16 +0000)
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@510575 13f79535-47bb-0310-9956-ffa450edef68

archiva-webapp/src/main/java/org/apache/maven/archiva/web/repository/RepositoryServlet.java

index d658dce275b7639fb3c73578dedfa9ea8014fbcb..687dae1f23ccf341363f165dcd1ba8f58831cbaa 100644 (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 );
         }
     }