NOISSUE add logging to zip subfolder extraction

This commit is contained in:
Petr Mrázek 2018-04-07 22:33:26 +02:00
parent 7e1c5d439a
commit 67cef79d81

View File

@ -212,8 +212,10 @@ QStringList MMCZip::extractSubDir(QuaZip *zip, const QString & subdir, const QSt
{ {
QDir directory(target); QDir directory(target);
QStringList extracted; QStringList extracted;
qDebug() << "Extracting subdir" << subdir << "from" << zip->getZipName() << "to" << target;
if (!zip->goToFirstFile()) if (!zip->goToFirstFile())
{ {
qWarning() << "Failed to seek to first file in zip";
return QStringList(); return QStringList();
} }
do do
@ -231,10 +233,12 @@ QStringList MMCZip::extractSubDir(QuaZip *zip, const QString & subdir, const QSt
} }
if (!JlCompress::extractFile(zip, "", absFilePath)) if (!JlCompress::extractFile(zip, "", absFilePath))
{ {
qWarning() << "Failed to extract file" << name << "to" << absFilePath;
JlCompress::removeFile(extracted); JlCompress::removeFile(extracted);
return QStringList(); return QStringList();
} }
extracted.append(absFilePath); extracted.append(absFilePath);
qDebug() << "Extracted file" << name;
} while (zip->goToNextFile()); } while (zip->goToNextFile());
return extracted; return extracted;
} }