Bug 286339 URIUtil.append error with UNC path with single letter server name
diff --git a/bundles/org.eclipse.equinox.common/src/org/eclipse/core/runtime/URIUtil.java b/bundles/org.eclipse.equinox.common/src/org/eclipse/core/runtime/URIUtil.java
index d88b228..284e181 100644
--- a/bundles/org.eclipse.equinox.common/src/org/eclipse/core/runtime/URIUtil.java
+++ b/bundles/org.eclipse.equinox.common/src/org/eclipse/core/runtime/URIUtil.java
@@ -103,7 +103,8 @@
int len = path.length();
StringBuffer result = new StringBuffer(len);
for (int i = 0; i < 4; i++) {
- if (i >= len || path.charAt(i) != '/')
+ // if we have hit the first non-slash character, add another leading slash
+ if (i >= len || result.length() > 0 || path.charAt(i) != '/')
result.append('/');
}
result.append(path);