Use encoded version of path for jar URLs
Update `JarUrl` so that the encoded version of the path is used. This allows jars to placed in directories with `#` or `!` in the name. Fixes gh-38660
This commit is contained in:
@@ -79,7 +79,7 @@ public final class JarUrl {
|
||||
}
|
||||
|
||||
private static String getJarReference(File file, String nestedEntryName) {
|
||||
String jarFilePath = file.toURI().getPath();
|
||||
String jarFilePath = file.toURI().getRawPath().replace("!", "%21");
|
||||
return (nestedEntryName != null) ? "nested:" + jarFilePath + "/!" + nestedEntryName : "file:" + jarFilePath;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user