fix: Fix ZIP multi-volume compression not working after pzip plugin w…#410
Conversation
…as introduced - pzip plugin (priority 200) preempted cli7z (priority 180) for all ZIP compression tasks, but pzip does not support multi-volume splitting. - Added explicit plugin selection to force cli7z when ZIP multi-volume is requested, restoring the original behavior. bug: https://pms.uniontech.com/bug-view-360941.html
There was a problem hiding this comment.
Sorry @dengzhongyuan365-dev, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
deepin pr auto review你好!我是CodeGeeX,你的智能编程助手。我已仔细审查了你提供的 Git Diff 内容。本次修改主要涉及 以下是我从语法逻辑、代码质量、代码性能和代码安全四个维度提出的详细审查意见与改进建议: 1. 语法与逻辑
2. 代码质量
3. 代码性能
4. 代码安全
改进建议代码示例针对 // 建议在头文件或匿名命名空间中定义常量,避免魔法字符串
namespace {
constexpr const char* MIME_TYPE_ZIP = "application/zip";
constexpr const char* MIME_TYPE_TAR_GZ = "application/x-compressed-tar";
}
// ... 函数内部 ...
void MainWindow::slotCompress(const QVariant &val)
{
// ... 前置逻辑 ...
// 统一布尔值判断风格,去除冗余的 true/false 比较
} else if (!options.bSplit && bUseLibarchive && MIME_TYPE_ZIP == m_stCompressParameter.strMimeType) {
// 考虑到华为arm平台 zip压缩 性能提升,只针对zip类型的压缩才会考虑到是否特殊处理arm平台,分卷情况不做此处理
eType = UiTools::APT_Libarchive;
} else if (options.bSplit && MIME_TYPE_ZIP == m_stCompressParameter.strMimeType) {
// 【注意】此处依赖 APT_Cli7z,需确保底层 QProcess 防命令注入,且评估大文件分卷时的临时空间与性能消耗
eType = UiTools::APT_Cli7z;
} else if (MIME_TYPE_TAR_GZ == m_stCompressParameter.strMimeType && m_stCompressParameter.strArchiveName.endsWith("tar.gz")) {
if (1 == m_stCompressParameter.iCPUTheadNum) {
// 针对单线程的tar.gz,使用gzip默认方式进行压缩
}
}
// ... 后续逻辑 ...
}关于
|
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: dengzhongyuan365-dev, lzwind 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 |
|
/merge |
…as introduced
bug: https://pms.uniontech.com/bug-view-360941.html