Skip to content

Commit

Permalink
Skip files when scanning modules
Browse files Browse the repository at this point in the history
  • Loading branch information
vvb2060 authored and topjohnwu committed Oct 28, 2018
1 parent ceb51bb commit 1f3f881
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app/src/full/java/com/topjohnwu/magisk/utils/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,11 @@ public static void loadModules() {
AsyncTask.THREAD_POOL_EXECUTOR.execute(() -> {
Map<String, Module> moduleMap = new ValueSortedMap<>();
SuFile path = new SuFile(Const.MAGISK_PATH);
String[] modules = path.list(
SuFile[] modules = path.listFiles(
(file, name) -> !name.equals("lost+found") && !name.equals(".core"));
for (String name : modules) {
Module module = new Module(Const.MAGISK_PATH + "/" + name);
for (SuFile file : modules) {
if (file.isFile()) continue;
Module module = new Module(Const.MAGISK_PATH + "/" + file.getName());
moduleMap.put(module.getId(), module);
}
Topic.publish(Topic.MODULE_LOAD_DONE, moduleMap);
Expand Down

0 comments on commit 1f3f881

Please sign in to comment.