Skip to content

Commit 9bb03be

Browse files
committed
fix URI handling for mixins on windows in dev
1 parent c011a96 commit 9bb03be

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/main/java/com/falsepattern/lib/mixin/IMixinPlugin.java

+6-6
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ static File findJarOf(final ITargetedMod mod) {
7474
File found = null;
7575
for (URL url : Launch.classLoader.getURLs()) {
7676
try {
77-
String file = url.getFile();
78-
Path path = Paths.get(file);
77+
val file = new File(url.toURI());
78+
Path path = file.toPath();
7979
if (mod.isMatchingJar(path)) {
80-
found = path.toFile();
80+
found = file;
8181
break;
8282
}
8383
} catch (Exception ignored) {
@@ -102,10 +102,10 @@ static Set<File> findJarsOf(IMixinPlugin self, final ITargetedMod mod) {
102102
}
103103
for (URL url : Launch.classLoader.getURLs()) {
104104
try {
105-
String file = url.getFile();
106-
Path path = Paths.get(file);
105+
val file = new File(url.toURI());
106+
Path path = file.toPath();
107107
if (mod.isMatchingJar(path)) {
108-
results.add(path.toFile());
108+
results.add(file);
109109
break;
110110
}
111111
} catch (Exception ignored) {

0 commit comments

Comments
 (0)