Bugfix for files with colons (#1881)

Fix source code view for files with colons (:).
This commit is contained in:
René Pfeuffer
2021-12-02 09:29:23 +01:00
committed by GitHub
parent 7f807a8e0f
commit fa17c339a2
4 changed files with 39 additions and 71 deletions

View File

@@ -44,7 +44,7 @@ class ResourceLinks {
// we have to add the file path using URI, so that path separators (aka '/') will not be encoded as '%2F'
private static String addPath(String sourceWithPath, String path) {
try {
return new URI(sourceWithPath).resolve(new URI(null, null, path, null)).toASCIIString();
return new URI(sourceWithPath).resolve(new URI(null, null, "./" + path, null)).toASCIIString();
} catch (URISyntaxException e) {
throw new RuntimeException(e);
}