diff --git a/scripts/util_functions.sh b/scripts/util_functions.sh index f56dceefc..7e3d0ece9 100644 --- a/scripts/util_functions.sh +++ b/scripts/util_functions.sh @@ -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