From 21b9d4714f47d7dcc47008a46b285cd217a74644 Mon Sep 17 00:00:00 2001 From: modmuss50 Date: Fri, 12 Nov 2021 16:44:51 +0000 Subject: [PATCH] Fix crash when running on UNC (windows) network share. See: https://bugs.openjdk.java.net/browse/JDK-8178726 --- .../org/spongepowered/asm/launch/platform/MainAttributes.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/spongepowered/asm/launch/platform/MainAttributes.java b/src/main/java/org/spongepowered/asm/launch/platform/MainAttributes.java index 1ccd5763..166db3da 100644 --- a/src/main/java/org/spongepowered/asm/launch/platform/MainAttributes.java +++ b/src/main/java/org/spongepowered/asm/launch/platform/MainAttributes.java @@ -99,7 +99,7 @@ public final class MainAttributes { } if ("file".equals(codeSource.getScheme())) { - File file = new File(codeSource); + File file = Paths.get(codeSource).toFile(); if (file.isFile()) { Attributes attributes = MainAttributes.getJarAttributes(file);