diff --git a/server/src/main/kotlin/ir/armor/tachidesk/impl/util/CachedImageResponse.kt b/server/src/main/kotlin/ir/armor/tachidesk/impl/util/CachedImageResponse.kt index 9eaf5ad..32b4525 100644 --- a/server/src/main/kotlin/ir/armor/tachidesk/impl/util/CachedImageResponse.kt +++ b/server/src/main/kotlin/ir/armor/tachidesk/impl/util/CachedImageResponse.kt @@ -24,7 +24,7 @@ object CachedImageResponse { private fun findFileNameStartingWith(directoryPath: String, fileName: String): String? { File(directoryPath).listFiles().forEach { file -> - if (file.name.startsWith(fileName)) + if (file.name.startsWith("$fileName.")) return "$directoryPath/${file.name}" } return null