aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-base/archiva-repository-admin
diff options
context:
space:
mode:
authorBrett Porter <brett@apache.org>2011-11-21 06:37:59 +0000
committerBrett Porter <brett@apache.org>2011-11-21 06:37:59 +0000
commit8b0e861e980711b62bc078426621ed13c00822f1 (patch)
tree77a177cb4af685978ba91acae43dcac2dd45878d /archiva-modules/archiva-base/archiva-repository-admin
parentfcb3e8c5345c9a9116a7068ece23412a59474309 (diff)
downloadarchiva-8b0e861e980711b62bc078426621ed13c00822f1.tar.gz
archiva-8b0e861e980711b62bc078426621ed13c00822f1.zip
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
Diffstat (limited to 'archiva-modules/archiva-base/archiva-repository-admin')
-rw-r--r--archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java2
1 files changed, 1 insertions, 1 deletions
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() );