Skip to content

Commit

Permalink
Escape exclamation mark escaping when creating a zip file
Browse files Browse the repository at this point in the history
  • Loading branch information
gsmet committed Oct 1, 2024
1 parent bab2a69 commit 78fba94
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/io/quarkus/fs/util/ZipUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ public static void unzip(Path zipFile, Path targetDir) throws IOException {
public static URI toZipUri(Path zipFile) throws IOException {
URI zipUri = zipFile.toUri();
try {
zipUri = new URL(JAR_URI_PREFIX + zipUri.getScheme() + "://" + zipUri.getRawPath() + "!/").toURI();
zipUri = new URL(JAR_URI_PREFIX + zipUri.getScheme() + "://" +
zipUri.getRawPath().replace("!/", "%21/") + "!/").toURI();
} catch (URISyntaxException e) {
throw new IOException("Failed to create a JAR URI for " + zipFile, e);
}
Expand Down

0 comments on commit 78fba94

Please sign in to comment.