Merge pull request #59 from ebarboni/testwinfix3

[MRM-2011] make getURIFromString compatible with windows path
This commit is contained in:
Eric Barboni 2020-02-18 19:23:50 +01:00 committed by GitHub
commit 276e0b1d19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

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);
}