diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderPresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderPresenter.kt index c349779d6..69cd6dff1 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderPresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderPresenter.kt @@ -332,9 +332,9 @@ class ReaderPresenter : BasePresenter() { fun retryPage(page: Page?) { if (page != null && source is OnlineSource) { page.status = Page.QUEUE - if (page.imagePath != null) { - val file = File(page.imagePath) - chapterCache.removeFileFromCache(file.name) + val path = page.imagePath + if (!path.isNullOrEmpty() && !page.chapter.isDownloaded) { + chapterCache.removeFileFromCache(File(path).name) } loader.retryPage(page) }