Skip to content

FIx : Remove automatic locking for moved apps - #23

Closed
IoneVesper wants to merge 7 commits into
wzh4869:mainfrom
IoneVesper:main
Closed

FIx : Remove automatic locking for moved apps#23
IoneVesper wants to merge 7 commits into
wzh4869:mainfrom
IoneVesper:main

Conversation

@IoneVesper

Copy link
Copy Markdown
Contributor

📝 变更说明 | Description

本次 PR 主要修复了两个与应用迁移后显示行为相关的问题:

  1. 本地应用列表中“已链接”应用大小显示错误
    已迁移到外部存储的应用,在本地 /Applications 列表中会错误显示外部真实应用体积,而不是本地入口壳应用本身的体积。这导致本地列表和外部应用库同时显示相同的大体积,和实际 Finder 中本地入口的占用不一致。

  2. 由 AppPorts 迁移到外部存储的应用会在 Finder 中显示锁定图标
    目前迁移完成后会对外部应用自动设置 immutable 锁定属性,导致 Finder 将这些应用显示为已锁定文件。

本次修复的核心逻辑是:

  • 本地应用列表中的 已链接 应用,改为显示本地入口壳应用的实际体积。
  • 外部应用库中的应用,仍然显示外部真实应用体积。
  • 类似 Anaconda 这类安装器原生创建的本地入口 symlink,仍保持按真实目标解析大小,避免再次出现 0B 问题。
  • 移除迁移完成后对外部应用自动加锁的逻辑,不再给外部 app 写入 immutable 属性。
  • 扫描外部应用库时,如果检测到此前由 AppPorts 链接管理的旧应用仍带有锁定标记,会自动清理该标记,恢复正常显示。

This PR fixes two issues related to moved apps. First, linked local apps now show the size of the local app portal instead of the full external app bundle, while external apps still show their real bundle size. Second, moved apps no longer get an automatic immutable lock applied, and previously locked managed apps can be automatically unlocked during external app scanning. Symlink-based local app entries such as Anaconda still resolve to their real target size correctly.

🔗 关联 Issue | Related Issues

迁移文件大小和打不开的问题

🧪 测试情况 | Testing

  • 已在本地 Xcode 环境运行通过 | Passed local Xcode build and run
  • 核心功能经过手动验证 | Core functions manually verified
  • 修复了可能导致的权限或异常问题 | Fixed potential permission or exception issues

*感谢你的贡献! | Thank you for your contribution!*💗

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@IoneVesper IoneVesper closed this Mar 12, 2026
@IoneVesper IoneVesper reopened this Mar 12, 2026
@wzh4869

wzh4869 commented Mar 12, 2026

Copy link
Copy Markdown
Owner

感谢再次提交 PR。
这个 PR 提交的期间,我这边也在同一批核心文件上继续做了较大调整,但这些更新目前还没有提交到远端,所以此 PR 我这边对比,现在还没法基于真正的最新版本做适配。为了避免你在旧结构上重复修改,这个 PR 先不用继续更新。
等我把后续 commit 推上去之后,如果你愿意的话,再请你同步最新代码,并基于新的实现结构调整这次功能。到时候你更新 PR,我会继续 review。
幸苦幸苦,也真是不好意思,后续 commit 推上去之后,我会在这里继续回复💗

@wzh4869

wzh4869 commented Mar 12, 2026

Copy link
Copy Markdown
Owner

我这边后续改动已经提交到主线了,你现在可以基于最新版本继续更新这个 PR。
建议先同步最新主线,再按当前代码结构做适配后直接 push 到你现有的 PR 分支。PR 本身我先保留打开,你更新后我会继续 review。
force-push 是我这边对已经推送的提交做了历史整理,主线已经稳定在最新状态

@IoneVesper

Copy link
Copy Markdown
Contributor Author

这两个问题在最新版均未出现,我关闭这个了

@IoneVesper IoneVesper closed this Mar 15, 2026
@wzh4869

wzh4869 commented Mar 15, 2026

Copy link
Copy Markdown
Owner

幸苦幸苦,感谢你的贡献💗

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.

2 participants