mirror of
https://github.com/tw93/Mole.git
synced 2026-02-06 10:12:57 +00:00
feat: Add com.apple.finder cache to cleaning, protect specific apps from critical cleaning, implement login item whitelist checks
This commit is contained in:
@@ -82,6 +82,7 @@ declare -a DEFAULT_WHITELIST_PATTERNS=(
|
||||
"$HOME/Library/Caches/org.R-project.R/R/renv/*"
|
||||
"$HOME/Library/Caches/JetBrains*"
|
||||
"$HOME/Library/Caches/com.jetbrains.toolbox*"
|
||||
"$HOME/Library/Caches/com.apple.finder"
|
||||
"$FINDER_METADATA_SENTINEL"
|
||||
)
|
||||
|
||||
|
||||
@@ -74,6 +74,9 @@ fix_broken_login_items() {
|
||||
local launch_agents_dir="$HOME/Library/LaunchAgents"
|
||||
[[ -d "$launch_agents_dir" ]] || return 0
|
||||
|
||||
# Check whitelist
|
||||
if command -v is_whitelisted > /dev/null && is_whitelisted "check_login_items"; then return 0; fi
|
||||
|
||||
local broken_count=0
|
||||
|
||||
while IFS= read -r plist_file; do
|
||||
|
||||
Reference in New Issue
Block a user