]> source.dussan.org Git - archiva.git/commitdiff
make getURIFromString compatible with windows path 59/head
authorEric Barboni <skygo@apache.org>
Tue, 18 Feb 2020 10:14:20 +0000 (11:14 +0100)
committerEric Barboni <skygo@apache.org>
Tue, 18 Feb 2020 10:14:20 +0000 (11:14 +0100)
archiva-modules/archiva-maven/archiva-maven-repository/src/main/java/org/apache/archiva/repository/maven2/MavenRepositoryProvider.java

index a68d7085171df89e9c180ea6c14f405289de56cf..aeb547728b33e8117017a2897f5b4acb3440a359 100644 (file)
@@ -135,6 +135,9 @@ public class MavenRepositoryProvider implements RepositoryProvider {
             if (uriStr.startsWith("/")) {
                 // only absolute paths are prepended with file scheme
                 uri = new URI("file://" + uriStr);
+            } else if (uriStr.contains(":\\")) {
+                //windows absolute path drive 
+                uri = new URI("file:///" + uriStr.replaceAll("\\\\", "/"));
             } else {
                 uri = new URI(uriStr);
             }