From 0236ffded745c3d7da478ce9387f10d5d6bb0c1c 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 34b029581..3173461f5 100755 --- a/src/types.rs +++ b/src/types.rs @@ -702,7 +702,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 f89596c3a..1c85a00c6 100644 --- a/src/write.rs +++ b/src/write.rs @@ -1775,7 +1775,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(()) }