Repository navigation
fix(windows): repair icons on legacy ChatGPT shortcuts - #460
Merged
Wangnov merged 5 commits intoOct 23, 2026
Merged
Conversation
Wangnov
requested changes
Oct 23, 2026
Wangnov
left a comment
Owner
There was a problem hiding this comment.
图标修复和依赖升级方向已核对,当前 CI 通过。独立兼容复现发现 ZIP 9 对未设置 UTF-8 标志的合法 CP437 文件名改变了解码结果,会使主题资源和 MSIX BlockMap 失配;请补齐这项回归后再合并。
| .by_index(index) | ||
| .map_err(|e| err(format!("读取压缩包条目失败: {e}")))?; | ||
| let entry_name = entry | ||
| .name() |
Owner
There was a problem hiding this comment.
[P2] 保留未设置 UTF-8 标志的 CP437 文件名语义。zip 9.0.5 的 name() 总是先按 UTF-8 解码,zip 8 则按 ZIP language flag 选择。有效 CP437 文件名原始字节 C3 A9 2E 77 65 62 70(flag 0、无 UnicodePath)原先是「├⌐.webp」,这里变为「é.webp」。已用真实 import_codexskin 入口复现:theme.json 引用 assets/├⌐.webp 时,导入报 asset unreadable;Windows 安装入口同样因 BlockMap 的 app\├⌐.bin 与解压名 app/é.bin 不一致而报 payload missing。新增 0x82 用例覆盖不到这种“同时是有效 UTF-8”的 CP437 序列。请依据 name_raw()+flags() 保留编码语义(并尊重有效 UnicodePath extra),且在同一解码结果上做路径验证;仅修显示名而继续调用 enclosed_name() 仍会走 ZIP 9 的另一套解码。请同时核对 portable.rs 与 mac_update.rs 的对应入口。
This was referenced Oct 23, 2026
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.
Portable launch repair handles
Codex.lnkbut skips legacyChatGPT.lnk. A link to a root compatibility launcher can keep a blank icon or the launcher's fallback icon.Include an existing
ChatGPT.lnkwhen its target matches a known entry point of the current installation. Repair blank icons, launcher icon sources and missing known official icon sources; preserve other custom sources. Check and update the same loaded Shell link, changing only the icon path and index. Preserve the target, arguments, working directory, AppUserModelID, description and hotkey, and avoid rewriting correct links.The repository-wide audit gate also rejects the locked ZIP and TLS versions covered by RustSec advisories. Update zip to 9.0.5, rustls to 0.23.46, rustls-webpki to 0.103.16 and webpki-root-certs to 1.0.10, and adapt the archive readers to ZIP 9. Decode entry names from their effective raw bytes and language flag: CP437 unless UTF-8 is declared, with valid UnicodePath extra fields respected. Theme import, MSIX extraction, version probing and macOS preflight share this decoder. Path and symlink validation use the same decoded name; malformed declared UTF-8 is rejected.
Disable the updater's optional ZIP installer handler to remove its separate zip 4.6.1 dependency. The latest stable updater still uses ZIP 4 for this handler. Current Windows releases use signed NSIS
.exefiles; TLS, system proxy support and macOS.app.tar.gzhandling remain enabled. Legacy Windows ZIP update payloads are no longer supported.Download tests verify rejection of
file://by the public HTTPS-only path and final progress reporting by the transfer runner using a local fixture. Tests sharing download state run serially. Production download arguments are unchanged.Validation
cargo audit: no vulnerabilities.cargo deny check: passes.