Skip to content

Commit

Permalink
fixed double entry on file and directory
Browse files Browse the repository at this point in the history
  • Loading branch information
kilip committed Nov 21, 2018
1 parent b5ac152 commit 71a2305
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/PermissionsFixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ public function fix(CoreOptions $options, array $modules)
get_class($module)
));
} else {
$files = array_merge_recursive($files, $modFileLists);
foreach ($modFileLists as $file) {
if (!in_array($file, $files)) {
$files[] = $file;
}
}
}
}

Expand All @@ -67,7 +71,11 @@ public function fix(CoreOptions $options, array $modules)
get_class($module)
));
} else {
$directories = array_merge_recursive($directories, $modDirLists);
foreach ($modDirLists as $directory) {
if (!in_array($directory, $directories)) {
$directories[] = $directory;
}
}
}
}
}
Expand Down

0 comments on commit 71a2305

Please sign in to comment.