Ignore Io errors in extra field

IoErrors mean that the extra field was not long enough or contained an invalid lenght value.
These are ignored for now.

Resolves #32
This commit is contained in:
Mathijs van de Nes 2017-03-30 19:18:08 +02:00
parent 236050947a
commit 633360a5a7

View file

@ -256,7 +256,10 @@ fn central_header_to_zip_file<R: Read+io::Seek>(reader: &mut R) -> ZipResult<Zip
external_attributes: external_file_attributes,
};
try!(parse_extra_field(&mut result, &*extra_field));
match parse_extra_field(&mut result, &*extra_field) {
Ok(..) | Err(ZipError::Io(..)) => {},
Err(e) => try!(Err(e)),
}
// Go back after the central header
try!(reader.seek(io::SeekFrom::Start(return_position)));