mirror of
https://github.com/tw93/Mole.git
synced 2026-02-04 16:14:44 +00:00
feat: Improve cleaning protection for system settings and control center,
This commit is contained in:
@@ -214,7 +214,7 @@ is_bundle_orphaned() {
|
||||
|
||||
# Extra check for specific system bundles not covered by patterns
|
||||
case "$bundle_id" in
|
||||
loginwindow | dock | systempreferences | finder | safari)
|
||||
loginwindow | dock | systempreferences | systemsettings | settings | controlcenter | finder | safari)
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -121,7 +121,7 @@ clean_sandboxed_app_caches() {
|
||||
local bundle_id_lower=$(echo "$bundle_id" | tr '[:upper:]' '[:lower:]')
|
||||
|
||||
# Check explicit critical system components (case-insensitive regex)
|
||||
if [[ "$bundle_id_lower" =~ backgroundtaskmanagement || "$bundle_id_lower" =~ loginitems || "$bundle_id_lower" =~ systempreferences || "$bundle_id_lower" =~ controlcenter || "$bundle_id_lower" =~ biometrickit || "$bundle_id_lower" =~ sfl || "$bundle_id_lower" =~ tcc ]]; then
|
||||
if [[ "$bundle_id_lower" =~ backgroundtaskmanagement || "$bundle_id_lower" =~ loginitems || "$bundle_id_lower" =~ systempreferences || "$bundle_id_lower" =~ systemsettings || "$bundle_id_lower" =~ settings || "$bundle_id_lower" =~ preferences || "$bundle_id_lower" =~ controlcenter || "$bundle_id_lower" =~ biometrickit || "$bundle_id_lower" =~ sfl || "$bundle_id_lower" =~ tcc ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
@@ -262,7 +262,7 @@ clean_application_support_logs() {
|
||||
continue
|
||||
fi
|
||||
|
||||
if [[ "$app_name_lower" =~ backgroundtaskmanagement || "$app_name_lower" =~ loginitems || "$app_name_lower" =~ systempreferences || "$app_name_lower" =~ controlcenter || "$app_name_lower" =~ biometrickit || "$app_name_lower" =~ sfl || "$app_name_lower" =~ tcc ]]; then
|
||||
if [[ "$app_name_lower" =~ backgroundtaskmanagement || "$app_name_lower" =~ loginitems || "$app_name_lower" =~ systempreferences || "$app_name_lower" =~ systemsettings || "$app_name_lower" =~ settings || "$app_name_lower" =~ preferences || "$app_name_lower" =~ controlcenter || "$app_name_lower" =~ biometrickit || "$app_name_lower" =~ sfl || "$app_name_lower" =~ tcc ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
|
||||
@@ -24,6 +24,9 @@ readonly SYSTEM_CRITICAL_BUNDLES=(
|
||||
"systempreferences"
|
||||
"finder"
|
||||
"safari"
|
||||
"com.apple.Settings*"
|
||||
"com.apple.SystemSettings*"
|
||||
"com.apple.controlcenter*"
|
||||
"com.apple.backgroundtaskmanagement*"
|
||||
"com.apple.loginitems*"
|
||||
"com.apple.sharedfilelist*"
|
||||
|
||||
Reference in New Issue
Block a user