App crash fix

This commit is contained in:
tom5079
2019-07-07 16:36:42 +09:00
parent 22bdf61bb3
commit bce26f4557
5 changed files with 31 additions and 14 deletions

View File

@@ -110,6 +110,12 @@ class GalleryDownloader(
//Check cache
val cache = File(getCachedGallery(this@GalleryDownloader, galleryID), "reader.json")
try {
json.parse(serializer, cache.readText())
} catch(e: Exception) {
cache.delete()
}
if (cache.exists()) {
val cached = json.parse(serializer, cache.readText())