From 8b0e861e980711b62bc078426621ed13c00822f1 Mon Sep 17 00:00:00 2001 From: Brett Porter Date: Mon, 21 Nov 2011 06:37:59 +0000 Subject: [PATCH] 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 --- .../admin/repository/managed/DefaultManagedRepositoryAdmin.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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() ); -- 2.39.5