From 453c6a8ce17a1bfc01c70d38b00e594f82514e4e Mon Sep 17 00:00:00 2001 From: Mathijs van de Nes Date: Thu, 11 Sep 2014 14:01:42 +0200 Subject: [PATCH] Set made-by to a value with an upper byte of 0 With the old value, unzip would set all permissions to 000 --- src/spec.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/spec.rs b/src/spec.rs index 3dff5187..4c797994 100644 --- a/src/spec.rs +++ b/src/spec.rs @@ -105,7 +105,7 @@ pub fn write_local_file_header(writer: &mut T, file: &ZipFile) -> IoR pub fn write_central_directory_header(writer: &mut T, file: &ZipFile) -> IoResult<()> { try!(writer.write_le_u32(CENTRAL_DIRECTORY_HEADER_SIGNATURE)); - try!(writer.write_le_u16(1337)); + try!(writer.write_le_u16(0x00FF)); try!(writer.write_le_u16(20)); let flag = if file.encrypted { 1 } else { 0 }; try!(writer.write_le_u16(flag));