From 425c54cd5f1918a774f4c9ba255c889235af78e8 Mon Sep 17 00:00:00 2001 From: Rouven Spreckels Date: Wed, 18 Nov 2020 16:27:28 +0100 Subject: [PATCH] Fix updating local ZIP64 extra field. --- src/write.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/write.rs b/src/write.rs index 71ad91a1..5291accc 100644 --- a/src/write.rs +++ b/src/write.rs @@ -1062,7 +1062,7 @@ fn update_local_zip64_extra_field( writer: &mut T, file: &ZipFileData, ) -> ZipResult<()> { - let zip64_extra_field = file.header_start + 30 + file.file_name_raw.len() as u64; + let zip64_extra_field = file.header_start + 30 + file.file_name.as_bytes().len() as u64; writer.seek(io::SeekFrom::Start(zip64_extra_field + 4))?; writer.write_u64::(file.uncompressed_size)?; writer.write_u64::(file.compressed_size)?;