parent
ea588861e0
commit
8470ed86d1
@ -0,0 +1,39 @@
|
|||||||
|
From aff8d486584f91d5b8358f7aa9be759ddb2cd005 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Martin <martin@urbackup.org>
|
||||||
|
Date: Sat, 11 Dec 2021 12:51:50 +0100
|
||||||
|
Subject: [PATCH] Fix MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_UTF8 not being set
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
Petr Písař: Ported to 2.2.0.
|
||||||
|
|
||||||
|
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||||
|
---
|
||||||
|
miniz.c | 6 +++---
|
||||||
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/miniz.c b/miniz.c
|
||||||
|
index 071367f..95e4186 100644
|
||||||
|
--- a/miniz.c
|
||||||
|
+++ b/miniz.c
|
||||||
|
@@ -6407,13 +6407,13 @@ mz_bool mz_zip_writer_add_read_buf_callback(mz_zip_archive *pZip, const char *pA
|
||||||
|
mz_zip_internal_state *pState;
|
||||||
|
mz_uint64 file_ofs = 0, cur_archive_header_file_ofs;
|
||||||
|
|
||||||
|
- if (!(level_and_flags & MZ_ZIP_FLAG_ASCII_FILENAME))
|
||||||
|
- gen_flags |= MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_UTF8;
|
||||||
|
-
|
||||||
|
if ((int)level_and_flags < 0)
|
||||||
|
level_and_flags = MZ_DEFAULT_LEVEL;
|
||||||
|
level = level_and_flags & 0xF;
|
||||||
|
|
||||||
|
+ if (!(level_and_flags & MZ_ZIP_FLAG_ASCII_FILENAME))
|
||||||
|
+ gen_flags |= MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_UTF8;
|
||||||
|
+
|
||||||
|
/* Sanity checks */
|
||||||
|
if ((!pZip) || (!pZip->m_pState) || (pZip->m_zip_mode != MZ_ZIP_MODE_WRITING) || (!pArchive_name) || ((comment_size) && (!pComment)) || (level > MZ_UBER_COMPRESSION))
|
||||||
|
return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER);
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
Loading…
Reference in new issue