]> source.dussan.org Git - archiva.git/commitdiff
take of non absolute path when creating a repository
authorOlivier Lamy <olamy@apache.org>
Mon, 2 Apr 2012 19:26:58 +0000 (19:26 +0000)
committerOlivier Lamy <olamy@apache.org>
Mon, 2 Apr 2012 19:26:58 +0000 (19:26 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1308492 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java

index cd0291a7045ea0b6493876cf20f932668648c1d6..5a7c7cd1f2d79f89a4f55d22108c4dc9a8ead31d 100644 (file)
@@ -523,6 +523,12 @@ public class DefaultManagedRepositoryAdmin
     {
         // Normalize the path
         File file = new File( repository.getLocation() );
+        if ( !file.isAbsolute() )
+        {
+            // add appserver.base/repositories
+            file = new File( getRegistry().getString( "appserver.base" ) + File.separatorChar + "repositories",
+                             repository.getLocation() );
+        }
         repository.setLocation( file.getCanonicalPath() );
         if ( !file.exists() )
         {