Return empty NameMap if the share/deob/map directory does not exist

Signed-off-by: Graham <gpe@openrs2.dev>
pull/132/head
Graham 4 years ago
parent b946615169
commit 79b0103a06
  1. 4
      deob-map/src/main/java/dev/openrs2/deob/map/NameMapProvider.kt

@ -11,6 +11,10 @@ class NameMapProvider @Inject constructor(private val mapper: ObjectMapper) : Pr
override fun get(): NameMap {
val combinedMap = NameMap()
if (!Files.exists(PATH)) {
return combinedMap
}
for (file in Files.list(PATH).filter(::isYamlFile)) {
val map = Files.newBufferedReader(file).use { reader ->
mapper.readValue(reader, NameMap::class.java)

Loading…
Cancel
Save