mirror of
https://github.com/CherretGit/zaprett-app.git
synced 2026-03-22 00:28:15 +05:00
fix npe with invalid manifest
This commit is contained in:
@@ -160,9 +160,8 @@ fun getValidManifests(listsDir: File): Array<StorageData> {
|
||||
return (listsDir.listFiles()
|
||||
?.mapNotNull { file ->
|
||||
if (!file.isFile || file.extension.lowercase() != "json") return@mapNotNull null
|
||||
|
||||
parseManifestFromFile(file).getOrNull().takeIf {
|
||||
File(it!!.file).exists()
|
||||
parseManifestFromFile(file).getOrNull()?.takeIf {
|
||||
File(it.file).exists()
|
||||
}
|
||||
}
|
||||
?.toTypedArray()
|
||||
|
||||
Reference in New Issue
Block a user