Skip to content

Commit 969b789

Browse files
authored
Merge pull request #8658 from elpaso/bugfix-20783-crash-when-unzipping-corrupted-zip
Do not crash when zipped project is not a valid zip
2 parents 6de0160 + 9ca85f7 commit 969b789

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/qgsziputils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ bool QgsZipUtils::unzip( const QString &zipFilename, const QString &dir, QString
110110
}
111111
else
112112
{
113-
QString err = QObject::tr( "Error opening zip archive: '%1'" ).arg( zip_strerror( z ) );
113+
QString err = QObject::tr( "Error opening zip archive: '%1'" ).arg( z ? zip_strerror( z ) : zipFilename );
114114
QgsMessageLog::logMessage( err, QStringLiteral( "QgsZipUtils" ) );
115115
return false;
116116
}

0 commit comments

Comments
 (0)