From 1f374c1c82796882402d3e3de6f18e6dfd12467f Mon Sep 17 00:00:00 2001 From: zhangtingan Date: Mon, 14 Sep 2026 11:13:03 +0800 Subject: [PATCH] fix: prompt wrong password on single file extract MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. Root cause: handleJobErrorFinished() single-extract branch switch only handled ET_LongNameError and ET_MissingVolume, ET_WrongPassword fell into default:break and was silently swallowed 2. Fix: add ET_WrongPassword case to show floating message, matching the disabled #if 0 block and JT_Add branch behavior 3. Impact: only affects encrypted archive single-file extract with wrong password, no change to other error paths or operations Log: Show wrong password prompt on encrypted archive single file extract Influence: 1. Test single file extract from encrypted archive with wrong password 2. Test single file extract from encrypted archive with correct password 3. Test batch extract from encrypted archive with wrong password fix: 修复加密压缩包单文件提取时密码错误无提示 1. 根因:handleJobErrorFinished() 单文件提取分支的 switch 仅处理 ET_LongNameError 和 ET_MissingVolume,ET_WrongPassword 落入 default:break 被静默吞掉 2. 方案:在 switch 中新增 ET_WrongPassword case,弹出浮层提示, 与被 #if 0 禁用的逻辑及 JT_Add 分支处理方式一致 3. 影响:仅影响加密压缩包单文件提取输入错误密码的场景,不影响 其他错误类型和其他操作路径 Log: 加密压缩包右键单文件提取输入错误密码时提示密码错误 Influence: 1. 测试加密压缩包右键单个文件提取输入错误密码 2. 测试加密压缩包右键单个文件提取输入正确密码 3. 测试加密压缩包批量解压输入错误密码 PMS: BUG-376693 --- src/source/mainwindow.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/source/mainwindow.cpp b/src/source/mainwindow.cpp index 3de9e7ae2..f9736b841 100644 --- a/src/source/mainwindow.cpp +++ b/src/source/mainwindow.cpp @@ -1774,6 +1774,10 @@ void MainWindow::handleJobErrorFinished(ArchiveJob::JobType eJobType, ErrorType showErrorMessage(FI_Uncompress, EI_ArchiveMissingVolume, !(StartupType::ST_ExtractHere == m_eStartupType || StartupType::ST_Extractto == m_eStartupType)); break; + case ET_WrongPassword: { + sendMessage(new CustomFloatingMessage(icon, tr("Wrong password"), 1000, this)); + break; + } default: break; }