Repository navigation
fix: add zip split archive MIME type registration - #510
Merged
deepin-bot[bot] merged 1 commit intoOct 15, 2026
Merged
deepin-bot[bot] merged 1 commit into
deepin-bot[bot] merged 1 commit into
Conversation
1. Add zip split archive MIME type registration in deepin-compressor.xml 2. Register application/zip type with glob patterns *.zip.[0-9][0-9][0-9] and *.z[0-9][0-9] 3. Set generic-icon to deepin-compressor for consistent icon display Log: Fixed zip split archive icon inconsistency after upgrade Influence: 1. Test zip split archive (.zip.001) icon display in file manager 2. Test zip split archive (.z01) icon display in file manager 3. Verify normal .zip files still display correct icon fix: 新增 zip 分卷压缩包 MIME 类型注册 1. 在 deepin-compressor.xml 中新增 zip 分卷压缩包 MIME 类型注册 2. 注册 application/zip 类型,添加 *.zip.[0-9][0-9][0-9] 和 *.z[0-9][0-9] glob 模式 3. 设置 generic-icon 为 deepin-compressor 确保图标显示一致 Log: 修复升级后 zip 分卷压缩包图标显示不一致的问题 Influence: 1. 测试文件管理器中 zip 分卷压缩包 (.zip.001) 图标显示 2. 测试文件管理器中 zip 分卷压缩包 (.z01) 图标显示 3. 验证普通 .zip 文件图标显示不受影响 PMS: BUG-268375
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThe PR extends the MIME database with two split-ZIP glob patterns under application/zip, mirroring the existing split-7z registration and preserving the existing archive icon behavior for normal ZIP files. Flow diagram for split ZIP MIME detectionflowchart LR
A[ZIP split archive file] --> B{Filename matches registered glob}
B -->|*.zip.#91;0-9#93;#91;0-9#93;#91;0-9#93;| C[application/zip]
B -->|*.z#91;0-9#93;#91;0-9#93;| C
C --> D[deepin-compressor icon]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
max-lvs
approved these changes
Oct 15, 2026
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: liyigang1, max-lvs The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Author
|
/merge |
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.
Root Cause Analysis
deepin-compressor.xmlonly registered the 7z split archive glob pattern (*.7z.*), but did not register any MIME type or glob pattern for zip split archives (.zip.001,.z01, etc.). The systemfreedesktop.org.xmlalso only covers*.zip/*.zipxwithout split suffixes. As a result, the file manager falls back to content detection for.zip.001files → returnstext/plain→ displays a text icon, while normal.zipfiles matchapplication/zip→ display the archive icon, causing icon inconsistency.Fix
Add zip split archive MIME type registration in
deepin-compressor.xml, mirroring the existing 7z split archive registration. Registerapplication/ziptype with glob patterns*.zip.[0-9][0-9][0-9]and*.z[0-9][0-9], and setgeneric-icon name="deepin-compressor".Change Safety Assessment
Influence
根因分析
deepin-compressor.xml仅注册了 7z 分卷压缩包的 glob 模式(*.7z.*),未为 zip 分卷压缩包(.zip.001、.z01等)注册任何 MIME 类型或 glob 模式。系统freedesktop.org.xml也仅覆盖*.zip/*.zipx,不含分卷后缀。因此文件管理器对.zip.001等文件回退到内容检测 → 返回text/plain→ 显示文本图标,而普通.zip匹配application/zip→ 显示压缩包图标,导致图标不一致。修复方案
在
deepin-compressor.xml中新增 zip 分卷压缩包 MIME 类型注册,镜像现有 7z 分卷注册方式。注册application/zip类型,添加*.zip.[0-9][0-9][0-9]和*.z[0-9][0-9]glob 模式,设置generic-icon name="deepin-compressor"。改动安全评估
影响范围
PMS: BUG-268375
Summary by Sourcery
Register MIME metadata for split ZIP archives so they are recognized and displayed consistently with regular archives.
New Features:
application/zipMIME type and compressor icon.Bug Fixes:
.zip.001and.z01split archives receive correct MIME detection and file manager icons instead of being treated as plain text.