Browse Source

Merge pull request #59 from ebarboni/testwinfix3

[MRM-2011] make getURIFromString compatible with windows path
pull/60/head
Eric Barboni 4 years ago
parent
commit
276e0b1d19
No account linked to committer's email address

+ 3
- 0
archiva-modules/archiva-maven/archiva-maven-repository/src/main/java/org/apache/archiva/repository/maven2/MavenRepositoryProvider.java View 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);
}

Loading…
Cancel
Save