scripts: fix empty module cleanup

- should be sufficient for all basic modules, see https://github.com/topjohnwu/Magisk/issues/3119#issuecomment-704000783 for ideas for fixing it further on the daemon module-processing side

Fixes #3119
This commit is contained in:
osm0sis 2021-03-21 20:36:03 -03:00 committed by John Wu
parent 4dd3f55407
commit 023dbc6cb5
1 changed files with 2 additions and 1 deletions

View File

@ -753,10 +753,11 @@ install_module() {
copy_sepolicy_rules
fi
# Remove stuffs that don't belong to modules
# Remove stuff that doesn't belong to modules and clean up any empty directories
rm -rf \
$MODPATH/system/placeholder $MODPATH/customize.sh \
$MODPATH/README.md $MODPATH/.git*
rmdir -p $MODPATH
cd /
$BOOTMODE || recovery_cleanup