From a29010e0d7030b03976f888a8b361db78a79a42a Mon Sep 17 00:00:00 2001 From: Aria Moradi Date: Fri, 4 Jun 2021 10:43:03 +0430 Subject: [PATCH] fix chached image returning file type with extra . --- .../suwayomi/tachidesk/impl/util/storage/CachedImageResponse.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/main/kotlin/suwayomi/tachidesk/impl/util/storage/CachedImageResponse.kt b/server/src/main/kotlin/suwayomi/tachidesk/impl/util/storage/CachedImageResponse.kt index 28bc2d6..2c82a5c 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/impl/util/storage/CachedImageResponse.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/impl/util/storage/CachedImageResponse.kt @@ -32,7 +32,7 @@ object CachedImageResponse { val cachedFile = findFileNameStartingWith(saveDir, fileName) val filePath = "$saveDir/$fileName" if (cachedFile != null) { - val fileType = cachedFile.substringAfter(filePath) + val fileType = cachedFile.substringAfter("$filePath.") return Pair( pathToInputStream(cachedFile), "image/$fileType"