From bf936a844127f378003a62d1cbefac378265fb59 Mon Sep 17 00:00:00 2001 From: FooIbar <118464521+FooIbar@users.noreply.github.com> Date: Tue, 25 Jun 2024 14:20:40 +0000 Subject: [PATCH] Fixup --- .../commonMain/kotlin/tachiyomi/source/local/io/Archive.kt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/source-local/src/commonMain/kotlin/tachiyomi/source/local/io/Archive.kt b/source-local/src/commonMain/kotlin/tachiyomi/source/local/io/Archive.kt index e894a3ac94..f8b1f60089 100644 --- a/source-local/src/commonMain/kotlin/tachiyomi/source/local/io/Archive.kt +++ b/source-local/src/commonMain/kotlin/tachiyomi/source/local/io/Archive.kt @@ -1,15 +1,13 @@ package tachiyomi.source.local.io import com.hippo.unifile.UniFile +import tachiyomi.core.common.storage.extension object Archive { private val SUPPORTED_ARCHIVE_TYPES = listOf("zip", "cbz", "rar", "cbr", "7z", "cb7", "tar", "cbt", "epub") fun isSupported(file: UniFile): Boolean { - val name = file.name?.lowercase() ?: return false - val extension = name.substringAfterLast('.') - val nameWithoutExtension = name.substringBeforeLast('.') - return extension in SUPPORTED_ARCHIVE_TYPES + return file.extension?.lowercase() in SUPPORTED_ARCHIVE_TYPES } }