mirror of
https://github.com/FabricMC/fabric.git
synced 2025-04-15 00:14:28 -04:00
Fix crash when loading resources from a UNC (windows) network share.
See: https://bugs.openjdk.java.net/browse/JDK-8178726
This commit is contained in:
parent
b4f4f6cda4
commit
31860a91ee
1 changed files with 1 additions and 2 deletions
|
@ -16,7 +16,6 @@
|
|||
|
||||
package net.fabricmc.fabric.mixin.resource.loader;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.JarURLConnection;
|
||||
|
@ -68,7 +67,7 @@ public abstract class DefaultResourcePackMixin {
|
|||
URLConnection connection = assetsRootUrl.openConnection();
|
||||
|
||||
if (connection instanceof JarURLConnection jarURLConnection) {
|
||||
return new ZipResourcePack(new File(jarURLConnection.getJarFileURL().toURI()));
|
||||
return new ZipResourcePack(Paths.get(jarURLConnection.getJarFileURL().toURI()).toFile());
|
||||
} else {
|
||||
// Not a jar, assume it's a regular directory.
|
||||
Path rootPath = Paths.get(assetsRootUrl.toURI()).resolve("../..").toAbsolutePath();
|
||||
|
|
Loading…
Add table
Reference in a new issue