From 978216eade65939879a8143535029c9c7335fb8c Mon Sep 17 00:00:00 2001 From: vvb2060 Date: Fri, 2 Sep 2022 23:28:44 +0800 Subject: [PATCH] local module: filter hidden dirs --- .../com/topjohnwu/magisk/core/model/module/LocalModule.kt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/src/main/java/com/topjohnwu/magisk/core/model/module/LocalModule.kt b/app/src/main/java/com/topjohnwu/magisk/core/model/module/LocalModule.kt index c15be3ea0..e4a02033d 100644 --- a/app/src/main/java/com/topjohnwu/magisk/core/model/module/LocalModule.kt +++ b/app/src/main/java/com/topjohnwu/magisk/core/model/module/LocalModule.kt @@ -122,15 +122,13 @@ data class LocalModule( companion object { - private val PERSIST get() = "${Const.MAGISKTMP}/mirror/persist/magisk" - fun loaded() = RootUtils.fs.getFile(Const.MAGISK_PATH).exists() suspend fun installed() = withContext(Dispatchers.IO) { RootUtils.fs.getFile(Const.MAGISK_PATH) .listFiles() .orEmpty() - .filter { !it.isFile } + .filter { !it.isFile && !it.isHidden } .map { LocalModule("${Const.MAGISK_PATH}/${it.name}") } .sortedBy { it.name.lowercase(Locale.ROOT) } }