diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/URIish.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/URIish.java index 3ee2feb14..3c5c8dadd 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/URIish.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/URIish.java @@ -376,8 +376,10 @@ public class URIish implements Serializable { public URIish(final URL u) { scheme = u.getProtocol(); path = u.getPath(); + path = cleanLeadingSlashes(path, scheme); try { rawPath = u.toURI().getRawPath(); + rawPath = cleanLeadingSlashes(rawPath, scheme); } catch (URISyntaxException e) { throw new RuntimeException(e); // Impossible }