From 40749dc76709a1792fb01f90fa9a03da03e7e0b7 Mon Sep 17 00:00:00 2001 From: stevenyomi <95685115+stevenyomi@users.noreply.github.com> Date: Sun, 21 Aug 2022 01:19:15 +0800 Subject: [PATCH] DownloadProvider: Remove duplicate in valid chapter dir name list (#7826) --- .../eu/kanade/tachiyomi/data/download/DownloadProvider.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadProvider.kt b/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadProvider.kt index 4258c3e0b7..3abbf12dec 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadProvider.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadProvider.kt @@ -157,7 +157,7 @@ class DownloadProvider(private val context: Context) { */ fun getValidChapterDirNames(chapterName: String, chapterScanlator: String?): List { val chapterDirName = getChapterDirName(chapterName, chapterScanlator) - return buildList(5) { + return buildList(4) { // Folder of images add(chapterDirName) @@ -168,10 +168,10 @@ class DownloadProvider(private val context: Context) { // Previously null scanlator fields were converted to "" due to a bug add("_$chapterDirName") add("_$chapterDirName.cbz") + } else { + // Legacy chapter directory name used in v0.9.2 and before + add(DiskUtil.buildValidFilename(chapterName)) } - - // Legacy chapter directory name used in v0.9.2 and before - add(DiskUtil.buildValidFilename(chapterName)) } } }