From: Brett Porter Date: Mon, 21 Nov 2011 06:37:59 +0000 (+0000) Subject: support Windows paths. Thanks to Chris Graham for the tip. X-Git-Tag: archiva-1.4-M2~90 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=8b0e861e980711b62bc078426621ed13c00822f1;p=archiva.git 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 --- diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java index 063e20d5e..a3ac32c0a 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java +++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java @@ -633,7 +633,7 @@ public class DefaultManagedRepositoryAdmin stagingRepository.setDeleteReleasedSnapshots( repository.isDeleteReleasedSnapshots() ); stagingRepository.setIndexDir( repository.getIndexDir() ); String path = repository.getLocation(); - int lastIndex = path.lastIndexOf( '/' ); + int lastIndex = path.replace( '\\', '/' ).lastIndexOf( '/' ); stagingRepository.setLocation( path.substring( 0, lastIndex ) + "/" + stagingRepository.getId() ); stagingRepository.setRefreshCronExpression( repository.getRefreshCronExpression() ); stagingRepository.setReleases( repository.isReleases() );