Skip to content

Commit

Permalink
fix URI handling for mixins on windows in dev
Browse files Browse the repository at this point in the history
  • Loading branch information
FalsePattern committed Jan 8, 2025
1 parent c011a96 commit 9bb03be
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/main/java/com/falsepattern/lib/mixin/IMixinPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ static File findJarOf(final ITargetedMod mod) {
File found = null;
for (URL url : Launch.classLoader.getURLs()) {
try {
String file = url.getFile();
Path path = Paths.get(file);
val file = new File(url.toURI());
Path path = file.toPath();
if (mod.isMatchingJar(path)) {
found = path.toFile();
found = file;
break;
}
} catch (Exception ignored) {
Expand All @@ -102,10 +102,10 @@ static Set<File> findJarsOf(IMixinPlugin self, final ITargetedMod mod) {
}
for (URL url : Launch.classLoader.getURLs()) {
try {
String file = url.getFile();
Path path = Paths.get(file);
val file = new File(url.toURI());
Path path = file.toPath();
if (mod.isMatchingJar(path)) {
results.add(path.toFile());
results.add(file);
break;
}
} catch (Exception ignored) {
Expand Down

0 comments on commit 9bb03be

Please sign in to comment.