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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user