Skip to content

Commit ca8a0a1

Browse files
Update QuiltBasePath.java: update URI conversion (#462)
1 parent 8969779 commit ca8a0a1

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/main/java/org/quiltmc/loader/impl/filesystem/QuiltBasePath.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -554,9 +554,17 @@ public URI toUri() {
554554
return toAbsolutePath().toUri();
555555
}
556556
try {
557-
// Passing as one string ensures that Java goes ahead and normalizes everything for us
557+
// Constructing as components ensures proper quoting on most
558558
// Adding the port stores the important info in both the authority and host
559-
return new URI(fs.provider().getScheme() + "://" + fs.name + ":0" + this);
559+
return new URI(
560+
fs.provider().getScheme(),
561+
null,
562+
fs.name,
563+
0,
564+
this.toString(),
565+
null,
566+
null
567+
).normalize();
560568
} catch (URISyntaxException e) {
561569
throw new RuntimeException(e);
562570
}

0 commit comments

Comments
 (0)