Update to use write_u16_le

Signed-off-by: Chris Hennick <4961925+Pr0methean@users.noreply.github.com>
This commit is contained in:
Chris Hennick 2024-05-09 12:20:40 -07:00 committed by GitHub
parent 5d3c73a5d5
commit 2676366199
Signed by: DevComp
GPG key ID: B5690EEEBB952194

View file

@ -1847,7 +1847,7 @@ fn write_central_directory_header<T: Write>(writer: &mut T, file: &ZipFileData)
let is_ascii = file.file_name_raw.is_ascii();
let flag = if is_utf8 && !is_ascii { 1u16 << 11 } else { 0 }
| if file.encrypted { 1u16 << 0 } else { 0 };
writer.write_u16::<LittleEndian>(flag)?;
writer.write_u16_le(flag)?;
// compression method
#[allow(deprecated)]
writer.write_u16_le(file.compression_method.to_u16())?;