mirror of
https://github.com/tw93/Mole.git
synced 2026-03-22 19:05:07 +00:00
fix: clean HTTPStorages binarycookies files and Preferences directories on uninstall
Add ~/Library/HTTPStorages/<bundle-id>.binarycookies to targeted uninstall cleanup. WKWebView creates both a directory and a .binarycookies file under HTTPStorages; only the directory was previously covered. Affected apps include cmux (com.cmuxterm.app) and Tuna (com.brnbw.Tuna). Also add ~/Library/Preferences/<bundle-id> directory detection for apps like VLC (org.videolan.vlc) that store preferences in a directory rather than a .plist file.
This commit is contained in:
@@ -950,6 +950,7 @@ find_app_files() {
|
||||
"$HOME/Library/WebKit/$bundle_id"
|
||||
"$HOME/Library/WebKit/com.apple.WebKit.WebContent/$bundle_id"
|
||||
"$HOME/Library/HTTPStorages/$bundle_id"
|
||||
"$HOME/Library/HTTPStorages/$bundle_id.binarycookies"
|
||||
"$HOME/Library/Cookies/$bundle_id.binarycookies"
|
||||
"$HOME/Library/LaunchAgents/$bundle_id.plist"
|
||||
"$HOME/Library/Application Scripts/$bundle_id"
|
||||
@@ -1044,6 +1045,7 @@ find_app_files() {
|
||||
# Handle Preferences and ByHost variants (only if bundle_id is valid)
|
||||
if [[ -n "$bundle_id" && "$bundle_id" != "unknown" && ${#bundle_id} -gt 3 ]]; then
|
||||
[[ -f ~/Library/Preferences/"$bundle_id".plist ]] && files_to_clean+=("$HOME/Library/Preferences/$bundle_id.plist")
|
||||
[[ -d ~/Library/Preferences/"$bundle_id" ]] && files_to_clean+=("$HOME/Library/Preferences/$bundle_id")
|
||||
[[ -d ~/Library/Preferences/ByHost ]] && while IFS= read -r -d '' pref; do
|
||||
files_to_clean+=("$pref")
|
||||
done < <(command find ~/Library/Preferences/ByHost -maxdepth 1 \( -name "$bundle_id*.plist" \) -print0 2> /dev/null)
|
||||
|
||||
Reference in New Issue
Block a user