diff --git a/decompiler/src/main/java/dev/openrs2/decompiler/DecompileCommand.kt b/decompiler/src/main/java/dev/openrs2/decompiler/DecompileCommand.kt index d9141a4cb5..db0c2587ce 100644 --- a/decompiler/src/main/java/dev/openrs2/decompiler/DecompileCommand.kt +++ b/decompiler/src/main/java/dev/openrs2/decompiler/DecompileCommand.kt @@ -23,11 +23,15 @@ class DecompileCommand : CliktCommand(name = "decompile") { } private fun getDestination(archive: String): Path { - var dir = archive.replace(Regex("(?:_gl)?[.]jar$"), "") + var dir = archive.replace(JAR_SUFFIX_REGEX, "") when (dir) { "runescape" -> dir = "client" "jaggl" -> dir = "gl" } return Paths.get("nonfree").resolve(dir).resolve("src/main/java") } + + companion object { + private val JAR_SUFFIX_REGEX = Regex("(?:_gl)?[.]jar$") + } }