fix to set MZ_ZIP_FLAG_LZMA_EOS_MARKER flag in raw mode

in function mz_zip_entry_write_open()

Fixes https://github.com/nmoinvaz/minizip/issues/255
This commit is contained in:
Viktor Szakats 2018-04-30 08:12:13 +00:00
parent ae5740b19c
commit 2884e67a1a

View File

@ -1263,8 +1263,6 @@ extern int32_t mz_zip_entry_write_open(void *handle, const mz_zip_file *file_inf
memcpy(&zip->file_info, file_info, sizeof(mz_zip_file));
compression_method = zip->file_info.compression_method;
if (compress_level == 0)
compression_method = MZ_COMPRESS_METHOD_RAW;
if (compression_method == MZ_COMPRESS_METHOD_DEFLATE)
{
@ -1299,6 +1297,9 @@ extern int32_t mz_zip_entry_write_open(void *handle, const mz_zip_file *file_inf
zip->file_info.aes_encryption_mode = MZ_AES_ENCRYPTION_MODE_256;
#endif
if (compress_level == 0)
compression_method = MZ_COMPRESS_METHOD_RAW;
if (err == MZ_OK)
err = mz_zip_entry_write_header(zip->stream, 1, &zip->file_info);
if (err == MZ_OK)