skip loading nonexisting dir instead of error

This commit is contained in:
minjaesong
2023-12-04 16:28:51 +09:00
parent 1ef7b4b37d
commit 06949985d1

View File

@@ -703,7 +703,9 @@ object ModMgr {
@JvmStatic operator fun invoke(module: String) {
audioPath.forEach {
getGdxFiles(module, it).forEach { file -> loadAudio("audio.${file.name()}", file) }
if (getGdxFile(module, it).let { it.exists() && it.isDirectory }) {
getGdxFiles(module, it).forEach { file -> loadAudio("audio.${file.name()}", file) }
}
}
}
}