mirror of
https://github.com/tw93/Mole.git
synced 2026-02-04 14:26:46 +00:00
feat: Enhance clean protection by explicitly excluding critical system components and adding case-insensitive bundle ID checks.
This commit is contained in:
@@ -118,8 +118,17 @@ clean_sandboxed_app_caches() {
|
||||
|
||||
# Extract bundle ID and check protection status early
|
||||
local bundle_id=$(basename "$container_dir")
|
||||
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 ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
if should_protect_data "$bundle_id"; then
|
||||
continue
|
||||
elif should_protect_data "$bundle_id_lower"; then
|
||||
continue
|
||||
fi
|
||||
|
||||
local cache_dir="$container_dir/Data/Library/Caches"
|
||||
|
||||
Reference in New Issue
Block a user