mirror of
https://github.com/tw93/Mole.git
synced 2026-03-22 20:15:07 +00:00
fix(uninstall): detect bundle-id-derived extension leftovers
Scan Application Scripts, Containers and FileProvider directories for entries that share the app bundle-id prefix (e.g. share extensions, file-provider extensions) so they are included in uninstall cleanup.
This commit is contained in:
@@ -109,6 +109,24 @@ setup() {
|
||||
[[ "$result" =~ .local/share/firefox ]]
|
||||
}
|
||||
|
||||
@test "find_app_files detects bundle-id-derived extension leftovers" {
|
||||
mkdir -p "$HOME/Library/Application Support/FileProvider/com.tencent.xinWeChat.WeChatFileProviderExtension"
|
||||
mkdir -p "$HOME/Library/Application Scripts/com.tencent.xinWeChat.WeChatMacShare"
|
||||
mkdir -p "$HOME/Library/Application Scripts/5A4RE8SF68.com.tencent.xinWeChat"
|
||||
mkdir -p "$HOME/Library/Containers/com.tencent.xinWeChat.WeChatFileProviderExtension"
|
||||
mkdir -p "$HOME/Library/Group Containers/5A4RE8SF68.com.tencent.xinWeChat"
|
||||
mkdir -p "$HOME/Library/Containers/com.tencent.otherapp.Helper"
|
||||
|
||||
result=$(find_app_files "com.tencent.xinWeChat" "WeChat")
|
||||
|
||||
[[ "$result" =~ "Library/Application Support/FileProvider/com.tencent.xinWeChat.WeChatFileProviderExtension" ]]
|
||||
[[ "$result" =~ "Library/Application Scripts/com.tencent.xinWeChat.WeChatMacShare" ]]
|
||||
[[ "$result" =~ "Library/Application Scripts/5A4RE8SF68.com.tencent.xinWeChat" ]]
|
||||
[[ "$result" =~ "Library/Containers/com.tencent.xinWeChat.WeChatFileProviderExtension" ]]
|
||||
[[ "$result" =~ "Library/Group Containers/5A4RE8SF68.com.tencent.xinWeChat" ]]
|
||||
[[ ! "$result" =~ "Library/Containers/com.tencent.otherapp.Helper" ]]
|
||||
}
|
||||
|
||||
@test "find_app_files does not match empty app name" {
|
||||
mkdir -p "$HOME/Library/Application Support/test"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user