Repository navigation
fix(windows): preserve metadata when repairing legacy shortcut icons - #457
Closed
2725238326 wants to merge 1 commit into
Closed
2725238326 wants to merge 1 commit into
2725238326 wants to merge 1 commit into
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.
An existing per-user Start-menu
ChatGPT.lnkis not covered by portable launch repair, which currently maintains onlyCodex.lnk. A legacy-named link with a stale explicit icon therefore keeps that icon even when Manager repairs the portable launchers. Also, the sharedensure_iconhelper recreates the link fromShortcutSpec, dropping Shell metadata such as its description and hotkey.This change loads the existing Shell Link and updates only its icon, preserving its target, arguments, working directory, AppUserModelID and other metadata. Portable launch repair also applies it to an existing
ChatGPT.lnkonly when the target matches this installation's payload or a supported root launcher. Missing links are not created; other applications, other installations and arbitrary executables inside the install root are left alone. An already-correct icon causes no write, and legacy-link errors are logged without blocking launch.This follows up on #440, which already embedded an icon in the launcher stubs. It does not change the root-launcher design or retarget existing links. The origin of a legacy link is not assumed, and the change neither diagnoses Windows shortcut restoration nor reads or writes undocumented backup registry data.
Validation
cargo clippy -p codex-win-engine --all-targets --locked --offline -- -D warningspassed.cargo test -p codex-win-engine --all-targets --locked --offline -- --skip download::tests::download_with_progress_reports_final_sizepassed: 149 unit tests and 6 offline contract tests; 11 existing tests ignored, 1 explicitly filtered out.download::tests::download_with_progress_reports_final_size: system curl reportsProtocol "file" is disabled. Reproduced the same failure on an unmodified checkout ofmainat31bd3f2; download code is unchanged.git diff --checkpassed. Full workspace/frontend checks and Explorer icon-cache behavior were not tested locally.