make getURIFromString compatible with windows path

This commit is contained in:
Eric Barboni 2020-02-18 11:14:20 +01:00
parent eb813618c5
commit 72be2a9419
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);
}