Fix build errors again

This commit is contained in:
Chris Hennick 2024-05-09 14:17:05 -07:00 committed by GitHub
parent 20e4c18280
commit b0a2cbbe52
Signed by: DevComp
GPG key ID: B5690EEEBB952194

View file

@ -1761,9 +1761,8 @@ fn write_local_file_header<T: Write>(writer: &mut T, file: &ZipFileData) -> ZipR
}
match extra_field_length.try_into::<u16>() {
Ok(length_u16) => writer.write_u16_le(length_u16)?,
Err(_) => return ZipError::InvalidArchive("Extra field is too long"),
Err(_) => return Err(ZipError::InvalidArchive("Extra field is too long")),
}
writer.write_u16_le(extra_field_length.try_into().map_err(|_| ZipError))?;
// file name
writer.write_all(&file.file_name_raw)?;
// zip64 extra field