mirror of
https://github.com/topjohnwu/Magisk
synced 2024-11-13 20:54:12 +01:00
Minor module related fixes
This commit is contained in:
parent
78c64d39ec
commit
2db1e5cb74
@ -414,7 +414,7 @@ static bool magisk_env() {
|
|||||||
|
|
||||||
static void prepare_modules() {
|
static void prepare_modules() {
|
||||||
// Upgrade modules
|
// Upgrade modules
|
||||||
if (auto dir = xopen_dir(MODULEUPGRADE); dir) {
|
if (auto dir = open_dir(MODULEUPGRADE); dir) {
|
||||||
for (dirent *entry; (entry = xreaddir(dir.get()));) {
|
for (dirent *entry; (entry = xreaddir(dir.get()));) {
|
||||||
if (entry->d_type == DT_DIR) {
|
if (entry->d_type == DT_DIR) {
|
||||||
if (entry->d_name == "."sv || entry->d_name == ".."sv)
|
if (entry->d_name == "."sv || entry->d_name == ".."sv)
|
||||||
@ -481,6 +481,7 @@ static void collect_modules() {
|
|||||||
if (access(buf, F_OK) == 0)
|
if (access(buf, F_OK) == 0)
|
||||||
exec_script(buf);
|
exec_script(buf);
|
||||||
frm_rf(modfd);
|
frm_rf(modfd);
|
||||||
|
unlinkat(dfd, entry->d_name, AT_REMOVEDIR);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user