From a0f10f868e2ff8d46c3aea6b47d5151c6b705d8a Mon Sep 17 00:00:00 2001 From: arkon Date: Thu, 5 Jan 2023 21:59:08 -0500 Subject: [PATCH] Handle file names with multiple ".cbz" occurrences properly Fixes #8838 --- .../java/eu/kanade/tachiyomi/data/download/DownloadCache.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadCache.kt b/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadCache.kt index dffc14bdb..3cddfddd7 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadCache.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadCache.kt @@ -312,7 +312,7 @@ class DownloadCache( // Folder of images it.isDirectory -> it.name // CBZ files - it.isFile && it.name?.endsWith(".cbz") == true -> it.name!!.replace(".cbz", "") + it.isFile && it.name?.endsWith(".cbz") == true -> it.name!!.substringBeforeLast(".cbz") // Anything else is irrelevant else -> null }