Unsolved Quazip JlCompress::extractDir error
-
Hi all,
I must decompress a zip archive.
I'm trying to use Quazip.
To include the library, I've added these lines inside .pro file###################### QUAZIP ###################### INCLUDEPATH += $$PWD/libs/quazip-0.7.3/quazip INCLUDEPATH += $$PWD/libs/zlib-1.2.8 win32 { LIBS += "$$PWD/libs/zlib-1.2.8/bin/win_x64/zlib.lib" LIBS += "$$PWD/libs/quazip-0.7.3/quazip/bin/win_x64/quazip.lib" } linux:!android { LIBS += -L$$PWD/libs/zlib-1.2.8/bin/linux_x64/ -lzlib LIBS += -L$$PWD/libs/quazip-0.7.3/quazip/bin/linux_x64/ -lquazip }
I got an error when I call
JlCompress::extractDir(zipSourceFile, output_path);
The problem seems the deallocation of the returned QStringList.
This is the error received...If I press the "ignore" button I got this error.
If I press the "ignore" button I got this error.
....and this is the code:void WindowRestart::unzipSourceFile(const QString &zipSourceFile) { qDebug() << "zipSourceFile:" << zipSourceFile; if (QFile::exists(zipSourceFile)) { QFileInfo fileinfo(m_processFullPath); QString output_path = fileinfo.absolutePath() + "/../"; qDebug() << "output_path" << output_path; if (!QFileInfo::exists(output_path)) { QDir dir; dir.mkpath(output_path); } JlCompress::extractDir(zipSourceFile, output_path); // <--- ERROR WHEN I EXECUTE THIS LINE // QStringList zip_files = JlCompress::extractDir(zipSourceFile, output_path); // if (zip_files.isEmpty()) // { // QMessageBox::critical(this, "Error extracting the project", // QString("Impossible to open the the file\n\nProbably you are attemping to extract a corrupted zip file"), // QMessageBox::Close); // } } }
The files are correctly extracted.
I'm using QT 5.14.2 under Windows 10.Thank you for every suggestions.