diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/glide/MangaDataFetcher.kt b/app/src/main/java/eu/kanade/tachiyomi/data/glide/MangaDataFetcher.kt index 8e1b0ee56..8d3453fc4 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/glide/MangaDataFetcher.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/glide/MangaDataFetcher.kt @@ -29,10 +29,15 @@ class MangaDataFetcher(private val networkFetcher: DataFetcher, if (!file.exists()) { file.parentFile.mkdirs() networkFetcher.loadData(priority)?.let { - it.use { input -> - file.outputStream().use { output -> - input.copyTo(output) + try { + it.use { input -> + file.outputStream().use { output -> + input.copyTo(output) + } } + } catch (e: Exception) { + file.delete() + throw e } } }