Skip to content

Commit

Permalink
Use minizip-ng 4.0.1 (from 3.0.7) (#1696)
Browse files Browse the repository at this point in the history
* Use minizip-ng 4.0.1 (from 3.0.7)

* Update writer tests
  • Loading branch information
flomnes authored Oct 13, 2023
1 parent 12c3abb commit 27de580
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ find_package(minizip)
if(NOT minizip_FOUND OR BUILD_MINIZIP)
# Repository + tag
set(MZ_REPOSITORY "https://github.com/zlib-ng/minizip-ng.git")
set(MZ_TAG "3.0.7")
set(MZ_TAG "4.0.1")
# CMake flags
set(MZ_LZMA "OFF" CACHE INTERNAL "")
set(MZ_ZSTD "OFF" CACHE INTERNAL "")
Expand Down
2 changes: 1 addition & 1 deletion src/libs/antares/writer/zip_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ ZipWriter::ZipWriter(std::shared_ptr<Yuni::Job::QueueService> qs,
pArchivePath(std::string(archivePath) + ".zip"),
pDurationCollector(duration_collector)
{
mz_zip_writer_create(&pZipHandle);
pZipHandle = mz_zip_writer_create();
if (int32_t ret = mz_zip_writer_open_file(pZipHandle, pArchivePath.c_str(), 0, 0); ret != MZ_OK)
{
logErrorAndThrow("Error opening zip file " + pArchivePath + " (" + std::to_string(ret) + ")");
Expand Down
3 changes: 1 addition & 2 deletions src/tests/src/libs/antares/writer/test_zip_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,7 @@ BOOST_AUTO_TEST_CASE(test_zip)
context.writer->finalize(true);

// Check content is correct
ZipReaderHandle readerHandle;
mz_zip_reader_create(&readerHandle);
ZipReaderHandle readerHandle = mz_zip_reader_create();
std::string zipPathStr = zipPath.string();
BOOST_CHECK(mz_zip_reader_open_file(readerHandle, zipPathStr.c_str()) == MZ_OK);
checkZipContent(readerHandle, "test-path", "test-content1");
Expand Down

0 comments on commit 27de580

Please sign in to comment.