take of non absolute path when creating a repository

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1308492 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2012-04-02 19:26:58 +00:00
parent 949b66bf1a
commit 3e8972f42e
1 changed files with 6 additions and 0 deletions

View 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() )
{