]> source.dussan.org Git - archiva.git/commitdiff
support Windows paths. Thanks to Chris Graham for the tip.
authorBrett Porter <brett@apache.org>
Mon, 21 Nov 2011 06:37:59 +0000 (06:37 +0000)
committerBrett Porter <brett@apache.org>
Mon, 21 Nov 2011 06:37:59 +0000 (06:37 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1204364 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 063e20d5e430603183a908b6c4f6f67bb2c02057..a3ac32c0a2b7e8d5531ff89c189347e0f865c913 100644 (file)
@@ -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() );