From 80903729a3d333238c10ccd86d785cdb41a876ba Mon Sep 17 00:00:00 2001 From: Tw93 Date: Thu, 25 Dec 2025 03:50:34 +0000 Subject: [PATCH] chore: auto format code --- lib/core/app_protection.sh | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/core/app_protection.sh b/lib/core/app_protection.sh index f35f3cb..303fb1c 100755 --- a/lib/core/app_protection.sh +++ b/lib/core/app_protection.sh @@ -652,23 +652,23 @@ find_app_files() { local expanded_path="${p/#\~/$HOME}" # Skip if path doesn't exist [[ ! -e "$expanded_path" ]] && continue - + # Safety check: Skip if path ends with a common directory name (indicates empty app_name/bundle_id) # This prevents deletion of entire Library subdirectories when bundle_id is empty case "$expanded_path" in */Library/Application\ Support | */Library/Application\ Support/ | \ - */Library/Caches | */Library/Caches/ | \ - */Library/Logs | */Library/Logs/ | \ - */Library/Containers | */Library/Containers/ | \ - */Library/WebKit | */Library/WebKit/ | \ - */Library/HTTPStorages | */Library/HTTPStorages/ | \ - */Library/Application\ Scripts | */Library/Application\ Scripts/ | \ - */Library/Autosave\ Information | */Library/Autosave\ Information/ | \ - */Library/Group\ Containers | */Library/Group\ Containers/) + */Library/Caches | */Library/Caches/ | \ + */Library/Logs | */Library/Logs/ | \ + */Library/Containers | */Library/Containers/ | \ + */Library/WebKit | */Library/WebKit/ | \ + */Library/HTTPStorages | */Library/HTTPStorages/ | \ + */Library/Application\ Scripts | */Library/Application\ Scripts/ | \ + */Library/Autosave\ Information | */Library/Autosave\ Information/ | \ + */Library/Group\ Containers | */Library/Group\ Containers/) continue ;; esac - + files_to_clean+=("$expanded_path") done @@ -781,16 +781,16 @@ find_app_system_files() { # Process patterns for p in "${system_patterns[@]}"; do [[ ! -e "$p" ]] && continue - + # Safety check: Skip if path ends with a common directory name (indicates empty app_name/bundle_id) case "$p" in /Library/Application\ Support | /Library/Application\ Support/ | \ - /Library/Caches | /Library/Caches/ | \ - /Library/Logs | /Library/Logs/) + /Library/Caches | /Library/Caches/ | \ + /Library/Logs | /Library/Logs/) continue ;; esac - + system_files+=("$p") done