aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Motsch <ivan.motsch@bsiag.com>2016-02-25 15:39:41 +0100
committerIvan Motsch <ivan.motsch@bsiag.com>2016-02-25 15:39:41 +0100
commit2baa5f1d6d97b2cf943a701b4586782f1ba70ce8 (patch)
tree186413c47d5cb7fa17816056a48412a7bbca1b89
parentf6a425cc97b0776d71db801e5baf9d03539e18c0 (diff)
downloadjgit-2baa5f1d6d97b2cf943a701b4586782f1ba70ce8.tar.gz
jgit-2baa5f1d6d97b2cf943a701b4586782f1ba70ce8.zip
Tests on Windows with URIish fail
The reason is that URIish(URL) and URIish(String) make different parsing of path / rawPath with regard to drive letters. /C:/... for URL and C:/... for String. This patch fixes the issue. Change-Id: I8e2013fff30b7bb198ff733c038e21366667b8a0 Signed-off-by: Ivan Motsch <ivan.motsch@bsiag.com>
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/URIish.java2
1 files changed, 2 insertions, 0 deletions
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 3ee2feb140..3c5c8daddd 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
}