diff --git a/src/zip.rs b/src/zip.rs index 16a1fcf..e20a45f 100644 --- a/src/zip.rs +++ b/src/zip.rs @@ -87,7 +87,7 @@ impl UploadedFile { /// through "Extra field length". fn shared_header_fields(&self, hash: Option) -> Vec { let mut fields = vec![ - 63, 0, // Minimum version required to extract: 6.3 for UTF-8 filenames + 45, 0, // Minimum version required to extract: 4.5 for ZIP64 0b00001000, // General purpose bit flag: bit 3 - size and CRC-32 in data descriptor 0b00001000, // General purpose bit flag: bit 11 - UTF-8 filenames 0, 0, // Compression method: none @@ -138,7 +138,7 @@ impl UploadedFile { fn central_directory_header(&self, local_header_offset: u64, hash: u32) -> Vec { let mut header = vec![ 0x50, 0x4b, 0x01, 0x02, // Central directory file header signature - 63, 3, // Made by a Unix system supporting version 6.3 + 45, 3, // Made by a Unix system supporting version 4.5 ]; header.append(&mut self.shared_header_fields(Some(hash))); append_0(&mut header, 8); // Comment length, disk number, internal attributes, DOS external attributes @@ -169,8 +169,8 @@ fn end_of_central_directory(files: &[UploadedFile]) -> Vec { ]; append_0(&mut eocd, 7); // pad out the rest of the size field eocd.append(&mut vec![ - 63, 3, // Made by a Unix system supporting version 6.3 - 63, 0, // Minimum version 6.3 to extract + 45, 3, // Made by a Unix system supporting version 4.5 + 45, 0, // Minimum version 4.5 to extract ]); append_0(&mut eocd, 8); // Two 4-byte disk numbers, both 0 // Number of central directory records, on this disk and in total