Skip to content

Commit 30d99e1

Browse files
committed
Fix KlsURI.jarPath
1 parent 773db1d commit 30d99e1

File tree

1 file changed

+3
-3
lines changed
  • server/src/main/kotlin/org/javacs/kt/externalsources

1 file changed

+3
-3
lines changed

server/src/main/kotlin/org/javacs/kt/externalsources/KlsURI.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ data class KlsURI(val fileUri: URI, val query: Map<QueryParam, Any>) {
5454
?.lastOrNull()
5555

5656
val jarPath: Path
57-
get() = Paths.get(fileUri.path.split("!")[0])
57+
get() = Paths.get(fileUri.schemeSpecificPart.split("!")[0])
5858
val innerPath: String?
59-
get() = fileUri.path.split("!", limit = 2).get(1)
59+
get() = fileUri.schemeSpecificPart.split("!", limit = 2).get(1)
6060

6161
val source: Boolean
6262
get() = query[QueryParam.SOURCE] as? Boolean ?: false
@@ -83,7 +83,7 @@ data class KlsURI(val fileUri: URI, val query: Map<QueryParam, Any>) {
8383

8484
fun toURI(): URI = URI(fileUri.toString() + queryString)
8585

86-
private fun toJarURL(): URL = URL("jar:${toURI().schemeSpecificPart}")
86+
private fun toJarURL(): URL = URL("jar:${fileUri.schemeSpecificPart}")
8787

8888
private fun openJarURLConnection() = toJarURL().openConnection() as JarURLConnection
8989

0 commit comments

Comments
 (0)