Skip to content

扩展卸载残留扫描目录#1109

Open
iwen-conf wants to merge 1 commit into
tw93:mainfrom
iwen-conf:codex/expand-uninstall-leftover-scan
Open

扩展卸载残留扫描目录#1109
iwen-conf wants to merge 1 commit into
tw93:mainfrom
iwen-conf:codex/expand-uninstall-leftover-scan

Conversation

@iwen-conf

Copy link
Copy Markdown

背景

卸载残留扫描已经覆盖常见 Library 目录,但一些应用会把残留放在 app-name 形式的 Preferences、Saved Application State 和 XDG cache 路径里,当前规则容易漏掉这些位置。

改动

  • 扩展用户级残留扫描,覆盖 app-name Preferences、Saved Application State 和 ~/.cache 命名变体。
  • 扩展系统级 review-only 扫描,补充 /Library/Preferences 和按产品名命中的 PrivilegedHelperTools。
  • 加固空 app-name 的路径保护,避免候选路径退化成 Library 或 XDG 根目录。
  • 补充卸载残留和命名变体测试。

验证

  • find bin lib -name "*.sh" -print0 | xargs -0 -n1 bash -n
  • MOLE_TEST_NO_AUTH=1 ./scripts/test.sh tests/uninstall.bats tests/uninstall_safety.bats tests/uninstall_naming_variants.bats tests/bundle_resolver.bats
  • go test ./cmd/...
  • 手工 smoke 覆盖新增残留命中和空 app-name 防退化

说明:当前本机缺少 shellcheck 和 bats,scripts/test.sh 中这两项按脚本逻辑跳过。

@iwen-conf iwen-conf requested a review from tw93 as a code owner June 11, 2026 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant