From ad1d51d0993aa407365f20b97e4004390ab5f937 Mon Sep 17 00:00:00 2001 From: Danny McClanahan <1305167+cosmicexplorer@users.noreply.github.com> Date: Mon, 13 May 2024 00:40:53 -0400 Subject: [PATCH] write file comment to central directory header --- src/types.rs | 1 - src/write.rs | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/types.rs b/src/types.rs index ddd2f79a..937afabb 100644 --- a/src/types.rs +++ b/src/types.rs @@ -775,7 +775,6 @@ impl ZipFileData { extra_field_length: zip64_extra_field_length + extra_field_len + central_extra_field_len, - /* FIXME: this appears to be set to 0 in write_central_directory_header() on master? */ file_comment_length: self.file_comment.as_bytes().len().try_into().unwrap(), disk_number: 0, internal_file_attributes: 0, diff --git a/src/write.rs b/src/write.rs index 86f1719d..58e43396 100644 --- a/src/write.rs +++ b/src/write.rs @@ -1777,7 +1777,7 @@ fn write_central_directory_header(writer: &mut T, file: &ZipFileData) writer.write_all(central_extra_field)?; } // file comment - // + writer.write_all(file.file_comment.as_bytes())?; Ok(()) }