Skip to content

Commit

Permalink
write file comment to central directory header
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmicexplorer committed May 24, 2024
1 parent ea30849 commit ad1d51d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1777,7 +1777,7 @@ fn write_central_directory_header<T: Write>(writer: &mut T, file: &ZipFileData)
writer.write_all(central_extra_field)?;
}
// file comment
// <none>
writer.write_all(file.file_comment.as_bytes())?;

Ok(())
}
Expand Down

0 comments on commit ad1d51d

Please sign in to comment.