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
13 changes: 13 additions & 0 deletions 3rdparty/libzipplugin/libzipplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,12 @@ PluginFinishType LibzipPlugin::extractFiles(const QList<FileEntry> &files, const
zip_close(archive);
return PFT_Cancel;
} else { // 处理错误
// 密码错误, 给出错误提示
if(ET_WrongPassword == m_eErrorType && !m_strPassword.isEmpty()) {
zip_close(archive);
m_strPassword = "";
return PFT_Error;
}
// 判断是否需要密码,若需要密码,弹出密码输入对话框,用户输入密码之后,重新解压当前文件
if (ET_WrongPassword == m_eErrorType || ET_NeedPassword == m_eErrorType) {
PasswordNeededQuery query(strFileName);
Expand Down Expand Up @@ -227,6 +233,13 @@ PluginFinishType LibzipPlugin::extractFiles(const QList<FileEntry> &files, const
zip_close(archive);
return PFT_Cancel;
} else { // 处理错误
//密码错误, 给出错误提示
if(ET_WrongPassword == m_eErrorType && !m_strPassword.isEmpty()) {
zip_close(archive);
m_strPassword = "";
emit error(("Wrong password."));
return PFT_Error;
}
// 判断是否需要密码,若需要密码,弹出密码输入对话框,用户输入密码之后,重新解压当前文件
if (ET_WrongPassword == m_eErrorType || ET_NeedPassword == m_eErrorType) {

Expand Down