From c8a8ce07e2ba050a32e33d71aaf353ee9a1f2436 Mon Sep 17 00:00:00 2001 From: Aria Moradi Date: Sun, 4 Apr 2021 00:52:58 +0430 Subject: [PATCH] fix windows path --- server/src/main/kotlin/ir/armor/tachidesk/impl/Extension.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/main/kotlin/ir/armor/tachidesk/impl/Extension.kt b/server/src/main/kotlin/ir/armor/tachidesk/impl/Extension.kt index 5432dba..f798857 100644 --- a/server/src/main/kotlin/ir/armor/tachidesk/impl/Extension.kt +++ b/server/src/main/kotlin/ir/armor/tachidesk/impl/Extension.kt @@ -68,7 +68,7 @@ object Extension { suspend fun installAPK(fetcher: suspend () -> String): Int { val apkFilePath = fetcher() - val apkName = Uri.parse(apkFilePath).lastPathSegment!! + val apkName = File(apkFilePath).name // check if we don't have the extension already installed // if it's installed and we want to update, it first has to be uninstalled