From 938389db5e5aeddf9535a68986e6bd60d38722dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8D=E7=94=9C=E7=9A=84=E7=A0=82=E7=B3=96?= <90336521+lings03@users.noreply.github.com> Date: Tue, 29 Oct 2024 14:09:06 +0800 Subject: [PATCH] ignore apk file --- .../main/java/top/laoxin/modmanager/tools/ArchiveUtil.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/main/java/top/laoxin/modmanager/tools/ArchiveUtil.kt b/app/src/main/java/top/laoxin/modmanager/tools/ArchiveUtil.kt index 0cae84d..ab20668 100644 --- a/app/src/main/java/top/laoxin/modmanager/tools/ArchiveUtil.kt +++ b/app/src/main/java/top/laoxin/modmanager/tools/ArchiveUtil.kt @@ -641,6 +641,12 @@ object ArchiveUtil { * 判断压缩包类型 */ private fun getFileType(file: File): FileType { + + // 判断是否为apk文件,无视其直接返回 + if (file.extension.equals("apk", ignoreCase = true)) { + return FileType.UNKNOWN + } + var inputStream: FileInputStream? = null try { inputStream = FileInputStream(file)