mirror of
https://github.com/zlib-ng/minizip-ng
synced 2025-03-28 21:13:18 +00:00
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:
parent
ae5740b19c
commit
2884e67a1a
5
mz_zip.c
5
mz_zip.c
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user