chore: Tweaks to make version_needed
and version_made_by
work with recently-merged changes
This commit is contained in:
parent
cda4712153
commit
92012b9795
2 changed files with 2 additions and 5 deletions
|
@ -770,7 +770,7 @@ impl ZipFileData {
|
||||||
.unwrap_or_else(DateTime::default_for_write);
|
.unwrap_or_else(DateTime::default_for_write);
|
||||||
ZipCentralEntryBlock {
|
ZipCentralEntryBlock {
|
||||||
magic: ZipCentralEntryBlock::MAGIC,
|
magic: ZipCentralEntryBlock::MAGIC,
|
||||||
version_made_by: (self.system as u16) << 8 | (self.version_made_by as u16),
|
version_made_by: (self.system as u16) << 8 | (self.version_made_by as u16).max(self.version_needed()),
|
||||||
version_to_extract: self.version_needed(),
|
version_to_extract: self.version_needed(),
|
||||||
flags: self.flags(),
|
flags: self.flags(),
|
||||||
compression_method: self.compression_method.serialize_to_u16(),
|
compression_method: self.compression_method.serialize_to_u16(),
|
||||||
|
|
|
@ -795,10 +795,7 @@ impl<W: Write + Seek> ZipWriter<W> {
|
||||||
aes_mode,
|
aes_mode,
|
||||||
extra_field,
|
extra_field,
|
||||||
);
|
);
|
||||||
let version_needed = file.version_needed();
|
file.version_made_by = file.version_made_by.max(file.version_needed() as u8);
|
||||||
file.version_made_by = file.version_made_by.max(version_needed as u8);
|
|
||||||
let version_needed = file.version_needed();
|
|
||||||
file.version_made_by = file.version_made_by.max(version_needed as u8);
|
|
||||||
let index = self.insert_file_data(file)?;
|
let index = self.insert_file_data(file)?;
|
||||||
let file = &mut self.files[index];
|
let file = &mut self.files[index];
|
||||||
let writer = self.inner.get_plain();
|
let writer = self.inner.get_plain();
|
||||||
|
|
Loading…
Add table
Reference in a new issue