This commit is contained in:
tom5079
2019-12-13 20:01:45 +09:00
parent 7a24c3c08e
commit 6a8539106b
2 changed files with 5 additions and 2 deletions

View File

@@ -98,7 +98,10 @@ fun updateOldReaderGalleries(context: Context) {
val json = Json(JsonConfiguration.Stable)
getOldReaderGalleries(context).forEach { gallery ->
val reader = json.parseJson(File(gallery, "reader.json").readText())
val reader = json.parseJson(File(gallery, "reader.json").apply {
if (!exists())
return@forEach
}.readText())
.jsonObject.toMutableMap()
val codeSerializer = EnumSerializer(Reader.Code::class)