Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix bugs
  • Loading branch information
Pr0methean committed Sep 11, 2025
commit 3fd452b0a9c8569faab19e4d3cf5c6bf1b43754a
2 changes: 1 addition & 1 deletion fuzz_write/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ fn do_operation(
"let sub_writer = {{\n\
let mut initial_junk = Cursor::new(vec!{initial_junk:?});\n\
initial_junk.seek(SeekFrom::End(0))?;
let mut writer = ZipWriter::new(initial_junk);",/
let mut writer = ZipWriter::new(initial_junk);",
)?;
}
let mut initial_junk = Cursor::new(initial_junk.into_vec());
Expand Down
5 changes: 5 additions & 0 deletions src/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,11 @@ impl<T: FileOptionExtension> FileOptions<'_, T> {
*self.permissions.get_or_insert(0o644) |= ffi::S_IFREG;
}

/// Indicates whether this file will be encrypted (whether with AES or ZipCrypto).
pub const fn has_encryption(&self) -> bool {
self.aes_mode.is_some() || self.encrypt_with.is_some()
}

/// Set the compression method for the new file
///
/// The default is `CompressionMethod::Deflated` if it is enabled. If not,
Expand Down
Loading