mirror of
				https://github.com/eledio-devices/thirdparty-miniz.git
				synced 2025-10-31 00:32:38 +01:00 
			
		
		
		
	Use UTF-8 for filenames in ZIP files per default
This commit is contained in:
		| @@ -2827,7 +2827,7 @@ mz_bool mz_zip_writer_add_mem_ex_v2(mz_zip_archive *pZip, const char *pArchive_n | ||||
|     if (uncomp_size || (buf_size && !(level_and_flags & MZ_ZIP_FLAG_COMPRESSED_DATA))) | ||||
|         bit_flags |= MZ_ZIP_LDH_BIT_FLAG_HAS_LOCATOR; | ||||
|  | ||||
|     if (level_and_flags & MZ_ZIP_FLAG_UTF8_FILENAME) | ||||
|     if (!(level_and_flags & MZ_ZIP_FLAG_ASCII_FILENAME)) | ||||
|         bit_flags |= MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_UTF8; | ||||
|  | ||||
|     if ((int)level_and_flags < 0) | ||||
| @@ -3106,7 +3106,7 @@ mz_bool mz_zip_writer_add_cfile(mz_zip_archive *pZip, const char *pArchive_name, | ||||
|     mz_uint8 extra_data[MZ_ZIP64_MAX_CENTRAL_EXTRA_FIELD_SIZE]; | ||||
|     mz_zip_internal_state *pState; | ||||
|  | ||||
|     if (level_and_flags & MZ_ZIP_FLAG_UTF8_FILENAME) | ||||
|     if (!(level_and_flags & MZ_ZIP_FLAG_ASCII_FILENAME)) | ||||
|         gen_flags |= MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_UTF8; | ||||
|  | ||||
|     if ((int)level_and_flags < 0) | ||||
|   | ||||
| @@ -97,7 +97,7 @@ typedef enum | ||||
|     MZ_ZIP_FLAG_VALIDATE_HEADERS_ONLY = 0x2000,     /* validate the local headers, but don't decompress the entire file and check the crc32 */ | ||||
|     MZ_ZIP_FLAG_WRITE_ZIP64 = 0x4000,               /* use the zip64 file format, instead of the original zip file format */ | ||||
|     MZ_ZIP_FLAG_WRITE_ALLOW_READING = 0x8000, | ||||
|     MZ_ZIP_FLAG_UTF8_FILENAME = 0x10000 | ||||
|     MZ_ZIP_FLAG_ASCII_FILENAME = 0x10000 | ||||
| } mz_zip_flags; | ||||
|  | ||||
| typedef enum | ||||
|   | ||||
		Reference in New Issue
	
	Block a user