From 565e780e04f871b1c4491c6e1c91b1af7fb0f648 Mon Sep 17 00:00:00 2001 From: ev chang Date: Tue, 22 Oct 2024 09:36:36 -0400 Subject: [PATCH] fix crash with spice --- gradle/wrapper/gradle-wrapper.properties | 2 +- .../kotlin/org/polyfrost/crashpatch/crashes/ModIdentifier.kt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 7431fb5..1672508 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip diff --git a/src/main/kotlin/org/polyfrost/crashpatch/crashes/ModIdentifier.kt b/src/main/kotlin/org/polyfrost/crashpatch/crashes/ModIdentifier.kt index e37172b..dc9dae3 100644 --- a/src/main/kotlin/org/polyfrost/crashpatch/crashes/ModIdentifier.kt +++ b/src/main/kotlin/org/polyfrost/crashpatch/crashes/ModIdentifier.kt @@ -48,6 +48,7 @@ object ModIdentifier { // Get the mod containing that class return try { if (url.protocol == "jar") url = URL(url.file.substring(0, url.file.indexOf('!'))) + if (url.protocol != "file") return emptySet() modMap[File(url.toURI()).canonicalFile] ?: emptySet() } catch (e: URISyntaxException) { throw RuntimeException(e)