1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-10 21:14:18 +00:00

feat: refactor uninstaller logic into uninstall_lib.sh and enhance app scanning with caching, parallel processing, and nested app exclusion.

This commit is contained in:
Tw93
2025-12-12 19:55:54 +08:00
parent 7e6c4d2e8c
commit 1e1c57b01f
3 changed files with 630 additions and 1 deletions

View File

@@ -109,6 +109,15 @@ scan_applications() {
local app_name
app_name=$(basename "$app_path" .app)
# Skip nested apps (e.g. inside Wrapper/ or Frameworks/ of another app)
# Check if parent path component ends in .app (e.g. /Foo.app/Bar.app or /Foo.app/Contents/Bar.app)
# This prevents false positives like /Old.apps/Target.app
local parent_dir
parent_dir=$(dirname "$app_path")
if [[ "$parent_dir" == *".app" || "$parent_dir" == *".app/"* ]]; then
continue
fi
# Try to get English name from bundle info, fallback to folder name
local bundle_id="unknown"
local display_name="$app_name"