From db433dfd4bad6eb5eccdb3b6710d77a67d17516d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Kuchy=C5=88ka=20=28Anty=29?= Date: Thu, 28 Nov 2024 17:26:54 +0100 Subject: [PATCH] fix: use file name instead of whole path for language guess --- .../src/main/kotlin/io/tolgee/formats/ImportFileProcessor.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/data/src/main/kotlin/io/tolgee/formats/ImportFileProcessor.kt b/backend/data/src/main/kotlin/io/tolgee/formats/ImportFileProcessor.kt index d6f4d3dff0..e365a6e0bd 100644 --- a/backend/data/src/main/kotlin/io/tolgee/formats/ImportFileProcessor.kt +++ b/backend/data/src/main/kotlin/io/tolgee/formats/ImportFileProcessor.kt @@ -8,7 +8,9 @@ abstract class ImportFileProcessor { abstract fun process() val languageNameGuesses: List by lazy { - val fileName = context.file.name + val filePath = context.file.name + + val fileName = filePath.substringAfterLast("/") val result = arrayOf(