support Windows paths. Thanks to Chris Graham for the tip.

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1204364 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Porter 2011-11-21 06:37:59 +00:00
parent fcb3e8c534
commit 8b0e861e98
1 changed files with 1 additions and 1 deletions

View File

@ -633,7 +633,7 @@ public class DefaultManagedRepositoryAdmin
stagingRepository.setDeleteReleasedSnapshots( repository.isDeleteReleasedSnapshots() ); stagingRepository.setDeleteReleasedSnapshots( repository.isDeleteReleasedSnapshots() );
stagingRepository.setIndexDir( repository.getIndexDir() ); stagingRepository.setIndexDir( repository.getIndexDir() );
String path = repository.getLocation(); String path = repository.getLocation();
int lastIndex = path.lastIndexOf( '/' ); int lastIndex = path.replace( '\\', '/' ).lastIndexOf( '/' );
stagingRepository.setLocation( path.substring( 0, lastIndex ) + "/" + stagingRepository.getId() ); stagingRepository.setLocation( path.substring( 0, lastIndex ) + "/" + stagingRepository.getId() );
stagingRepository.setRefreshCronExpression( repository.getRefreshCronExpression() ); stagingRepository.setRefreshCronExpression( repository.getRefreshCronExpression() );
stagingRepository.setReleases( repository.isReleases() ); stagingRepository.setReleases( repository.isReleases() );