Skip to content

Commit

Permalink
fix: zip file reader.
Browse files Browse the repository at this point in the history
  • Loading branch information
jochumdev committed Oct 14, 2024
1 parent 1c79f68 commit 4ca778a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/FileSystem/CZipArchive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,12 @@
#include "spdlog/spdlog.h"

CZipArchive::CZipArchive(const std::string& archiveName)
: IArchive(archiveName), streamHandle(nullptr), zipHandle(nullptr) {
mz_stream_os_create();
: IArchive(archiveName), streamHandle(mz_stream_os_create()), zipHandle(mz_zip_create()) {
if (mz_stream_open(streamHandle, archiveName.c_str(), MZ_OPEN_MODE_READ) != MZ_OK) {
spdlog::error("minizip: Error opening: {}", archiveName);
return;
}

mz_zip_create();
if (mz_zip_open(zipHandle, streamHandle, MZ_OPEN_MODE_READ) != MZ_OK) {
spdlog::error("minizip: Error opening: {}", archiveName);
return;
Expand Down

0 comments on commit 4ca778a

Please sign in to comment.