Skip to content

Commit

Permalink
pass MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_UTF8 to mz_zip_writer_add_to_cen…
Browse files Browse the repository at this point in the history
…tral_dir (#214)
  • Loading branch information
kuba-- authored Dec 10, 2021
1 parent 594dbd5 commit 72cb23c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/miniz.h
Original file line number Diff line number Diff line change
Expand Up @@ -4891,7 +4891,6 @@ static int mz_mkdir(const char *pDirname) {
#define MZ_DELETE_FILE remove
#define MZ_MKDIR(d) mz_mkdir(d)


#elif defined(__MINGW32__) || defined(__MINGW64__)
#include <windows.h>
#ifndef MINIZ_NO_TIME
Expand Down
9 changes: 5 additions & 4 deletions src/zip.c
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ static int zip_central_dir_move(mz_zip_internal_state *pState, int begin,
int i;
for (i = end; i < entry_num; i++) {
MZ_ZIP_ARRAY_ELEMENT(&pState->m_central_dir_offsets, mz_uint32, i) -=
d_size;
d_size;
}
}
}
Expand All @@ -657,7 +657,7 @@ static int zip_central_dir_move(mz_zip_internal_state *pState, int begin,
int i;
for (i = end; i < entry_num; i++) {
MZ_ZIP_ARRAY_ELEMENT(&pState->m_central_dir_offsets, mz_uint32, i) -=
d_size;
d_size;
}
}
}
Expand Down Expand Up @@ -1160,8 +1160,9 @@ int zip_entry_close(struct zip_t *zip) {
if (!mz_zip_writer_add_to_central_dir(
pzip, zip->entry.name, entrylen, NULL, 0, "", 0,
zip->entry.uncomp_size, zip->entry.comp_size, zip->entry.uncomp_crc32,
zip->entry.method, 0, dos_time, dos_date, zip->entry.header_offset,
zip->entry.external_attr, NULL, 0)) {
zip->entry.method, MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_UTF8, dos_time,
dos_date, zip->entry.header_offset, zip->entry.external_attr, NULL,
0)) {
// Cannot write to zip central dir
err = ZIP_EWRTDIR;
goto cleanup;
Expand Down

0 comments on commit 72cb23c

Please sign in to comment.