Skip to content

Commit 6e638f8

Browse files
committed
FIX: ziprepacker mz_zip_reader_init_file error for MSVC builds
1 parent 67d9c02 commit 6e638f8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

ZipRepacker/ziprepacker.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ int main(int argc, char **argv)
1616

1717
cxxopts::Options options("ZipRepacker", "Replace content in zip file");
1818
options.add_options()
19-
("i,input","Input file", cxxopts::value<string>())
20-
("c,content","Content file", cxxopts::value<string>())
21-
("o,output","Output file", cxxopts::value<string>())
19+
("i,input","Input zip file", cxxopts::value<string>())
20+
("c,content","Content eif file", cxxopts::value<string>())
21+
("o,output","Output zip file", cxxopts::value<string>())
2222
("h,help","Print help");
2323

2424
options.parse_positional({"input"});
@@ -87,7 +87,7 @@ int repack_zip(const fs::path& input_zip, const fs::path& content_file, const fs
8787
mz_zip_archive zip_archive = {};
8888

8989
status = mz_zip_reader_init_file(&zip_archive,
90-
(const char*)input_zip.c_str(),
90+
(const char*)input_zip.string().c_str(),
9191
MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY);
9292
if (!status)
9393
{
@@ -125,7 +125,7 @@ int repack_zip(const fs::path& input_zip, const fs::path& content_file, const fs
125125

126126
zip_archive = {};
127127
unsigned flags = MZ_DEFAULT_LEVEL | MZ_ZIP_FLAG_ASCII_FILENAME;
128-
status = mz_zip_writer_init_file_v2(&zip_archive, (const char*)out_zip.c_str(), 0, flags);
128+
status = mz_zip_writer_init_file_v2(&zip_archive, (const char*)out_zip.string().c_str(), 0, flags);
129129
if (!status) {
130130
cerr << "mz_zip_writer_init_file_v2 failed!";
131131
return -1;

0 commit comments

Comments
 (0)