mirror of
https://github.com/FalsePattern/FalsePatternLib.git
synced 2026-11-11 12:37:30 +00:00
fix windows filesystem bug thingy (#24)
This commit is contained in:
1 file changed
+11
-10
@@ -66,17 +66,18 @@ public interface IMixinPlugin extends IMixinConfigPlugin {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (result == null) {
|
||||
try {
|
||||
result = Arrays.stream(Launch.classLoader.getURLs())
|
||||
.map(URL::getPath)
|
||||
.map(Paths::get)
|
||||
.filter(mod::isMatchingJar)
|
||||
.map(Path::toFile)
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
File found = null;
|
||||
for (URL url : Launch.classLoader.getURLs()) {
|
||||
try {
|
||||
String file = url.getFile();
|
||||
Path path = Paths.get(file);
|
||||
if (mod.isMatchingJar(path)) {
|
||||
found = path.toFile();
|
||||
break;
|
||||
}
|
||||
} catch (Exception ignored) {}
|
||||
}
|
||||
result = found;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user