aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorskygo <skygo@unknown>2012-09-11 21:12:32 +0000
committerskygo <skygo@unknown>2012-09-11 21:12:32 +0000
commit0495fe9bc690864d03f8e704d2882dba8b4a4c76 (patch)
tree0a660bf5c595745eb381861fc68e0e656dd6eeff
parent23204cdc28fa89a1e07de764696c90c28b4426e2 (diff)
downloadarchiva-0495fe9bc690864d03f8e704d2882dba8b4a4c76.tar.gz
archiva-0495fe9bc690864d03f8e704d2882dba8b4a4c76.zip
split path using Pattern.quote to be windoz friendly
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1383613 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--archiva-modules/plugins/stage-repository-merge/src/main/java/org/apache/archiva/stagerepository/merge/Maven2RepositoryMerger.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/archiva-modules/plugins/stage-repository-merge/src/main/java/org/apache/archiva/stagerepository/merge/Maven2RepositoryMerger.java b/archiva-modules/plugins/stage-repository-merge/src/main/java/org/apache/archiva/stagerepository/merge/Maven2RepositoryMerger.java
index 589b6b6ed..c2a3f94b7 100644
--- a/archiva-modules/plugins/stage-repository-merge/src/main/java/org/apache/archiva/stagerepository/merge/Maven2RepositoryMerger.java
+++ b/archiva-modules/plugins/stage-repository-merge/src/main/java/org/apache/archiva/stagerepository/merge/Maven2RepositoryMerger.java
@@ -54,6 +54,7 @@ import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.TimeZone;
+import java.util.regex.Pattern;
/**
*
@@ -203,9 +204,9 @@ public class Maven2RepositoryMerger
METADATA_FILENAME );
if ( versionMetaDataFileInSourceRepo.exists() )
- {
+ {//Pattern quote for windows path
String relativePathToVersionMetadataFile =
- versionMetaDataFileInSourceRepo.getAbsolutePath().split( sourceRepoPath )[1];
+ versionMetaDataFileInSourceRepo.getAbsolutePath().split( Pattern.quote( sourceRepoPath ) )[1];
File versionMetaDataFileInTargetRepo = new File( targetRepoPath, relativePathToVersionMetadataFile );
if ( !versionMetaDataFileInTargetRepo.exists() )
@@ -226,7 +227,7 @@ public class Maven2RepositoryMerger
if ( projectMetadataFileInSourceRepo.exists() )
{
String relativePathToProjectMetadataFile =
- projectMetadataFileInSourceRepo.getAbsolutePath().split( sourceRepoPath )[1];
+ projectMetadataFileInSourceRepo.getAbsolutePath().split( Pattern.quote( sourceRepoPath ) )[1];
File projectMetadataFileInTargetRepo = new File( targetRepoPath, relativePathToProjectMetadataFile );
if ( !projectMetadataFileInTargetRepo.exists() )