Handle file names with multiple ".cbz" occurrences properly

Fixes #8838

(cherry picked from commit a0f10f868e2ff8d46c3aea6b47d5151c6b705d8a)
This commit is contained in:
arkon 2023-01-05 21:59:08 -05:00 committed by Jobobby04
parent 33d007a1a2
commit 07c781473f

View File

@ -327,7 +327,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
}