Repository navigation
fix(gpui): 写入日志与中断写入的启动恢复 - #91
Merged
Merged
Conversation
A forced quit, crash or shutdown timeout could leave hidden temporary outputs behind and, on Windows, the previous output only under its backup name. Each write now records its temporary and backup paths in a synced journal in the application data directory before creating them; at startup, while holding the instance marker, the shell restores a staged backup whose new output never arrived, removes leftover temporaries that match the generated names, and carries anything it cannot resolve forward. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ries Op ids are unique across journals so carried records never merge; a backup is never staged when its journal record cannot be written; entries whose folder cannot be inspected are kept instead of treated as done; a journal damaged before its last line is kept as *.unreadable; the end of a staged write is synced; recovery is retried after an output folder is granted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
实现
docs/GPUI_MACOS_LIFECYCLE_PLAN.md的 PR-B(L5)。问题
强退、崩溃或退出等待超时后,输出目录会留下隐藏的
.imgconvert-*.tmp;在需要先暂存旧输出的平台(主要是 Windows),中断还可能让用户原来的输出只剩imgconvert-backup-*名称。修复
imgconvert-backend::write_journal:在创建临时文件、暂存旧输出之前,把路径写入应用数据目录下pending-writes/的日志并落盘;写入结束追加结束记录。从不扫描用户文件夹,只处理日志点名的路径。验证
🤖 Generated with Claude Code