mirror of
https://github.com/tw93/Mole.git
synced 2026-02-16 16:25:17 +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
|
# Extract bundle ID and check protection status early
|
||||||
local bundle_id=$(basename "$container_dir")
|
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
|
if should_protect_data "$bundle_id"; then
|
||||||
continue
|
continue
|
||||||
|
elif should_protect_data "$bundle_id_lower"; then
|
||||||
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local cache_dir="$container_dir/Data/Library/Caches"
|
local cache_dir="$container_dir/Data/Library/Caches"
|
||||||
|
|||||||
Reference in New Issue
Block a user