Repository navigation
更新:换包前查出只读 DLL 和禁止删除的占用 - #149
Merged
qiyinxi merged 2 commits intoNov 13, 2026
Merged
Conversation
目录链接下的占用检查、自更新和恢复统一比较真实路径。先查占用再备份,被挡住时保留已核对的暂存包。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
只读 DLL 已被程序载入,或文件被允许读写、但不共享删除的句柄打开时,原来的写探测会放行。现在会在备份、换 SDK 前报忙,保留已核对的暂存包,关闭占用程序后可以直接重试。
验证使用 Go 1.26.5、Windows amd64:
build.ps1 -Go <go1.26.5> -Out <临时输出目录>、gofmt -l .、Windows 的go vet ./...及 darwin/arm64、linux/amd64 交叉 vet 通过。构建后的 CLIversion可运行。本机
go test ./... -count=1的其他包均通过,包括完整internal/update。其中internal/avd的测试程序在 Go 自动临时目录中反复遇到系统拒绝访问,拒绝来源未确认。用go test -c -o <临时输出目录>/avd.test.exe ./internal/avd编译后,在该包目录直接运行全部测试通过。没有修改安全软件配置。模块查询仍是尽力检查:无法读取、正在退出或模块列表持续变化的进程,以及检查后才出现的占用,仍走现有换包报错和恢复路径。可写文件被全共享普通读句柄打开时,MoveFileEx 覆盖仍可能在探测后失败,这个已有场景未扩展。未做模拟器、游戏或生产实例验收。
Refs ModAVD/ModAVD#191