Skip to content

Commit

Permalink
Update QuiltBasePath.java: update URI conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
StartsMercury committed Dec 26, 2024
1 parent e39ce88 commit f6a6815
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -554,9 +554,17 @@ public URI toUri() {
return toAbsolutePath().toUri();
}
try {
// Passing as one string ensures that Java goes ahead and normalizes everything for us
// Constructing as components ensures proper quoting on most
// Adding the port stores the important info in both the authority and host
return new URI(fs.provider().getScheme() + "://" + fs.name + ":0" + this);
return new URI(
fs.provider().getScheme(),
null,
fs.name,
0,
this.toString(),
null,
null
).normalize();
} catch (URISyntaxException e) {
throw new RuntimeException(e);
}
Expand Down

0 comments on commit f6a6815

Please sign in to comment.