Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions 3rdparty/interface/archiveinterface/cliinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1387,7 +1387,10 @@ void CliInterface::processFinished(int exitCode, QProcess::ExitStatus exitStatus
m_isCorruptArchive = false;
}

if (exitCode == 0) { // job正常结束
// If we already detected an error from stdout parsing, do not overwrite it
// just because the cli tool exits with code 0 (e.g. unrar may return 0 even
// when some entries fail to extract, such as long file name cases).
if (exitCode == 0 && m_finishType != PFT_Error && m_finishType != PFT_Cancel) {
m_finishType = PFT_Nomral;
}

Expand All @@ -1403,7 +1406,8 @@ void CliInterface::extractProcessFinished(int exitCode, QProcess::ExitStatus exi

deleteProcess();

if (0 == exitCode) { // job正常结束
// Keep stdout-detected errors (e.g. long name) even if exitCode is 0.
if (0 == exitCode && m_finishType != PFT_Error && m_finishType != PFT_Cancel) {
m_finishType = PFT_Nomral;
}

Expand Down
Loading