pass MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_UTF8 to mz_zip_writer_add_to_central_dir (#214)

This commit is contained in:
Kuba Podgórski 2021-12-10 12:14:38 +01:00 committed by GitHub
parent 594dbd5cc4
commit 72cb23c311
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -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;
}
}
}
@ -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;
}
}
}
@ -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;