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:
parent
236050947a
commit
633360a5a7
1 changed files with 4 additions and 1 deletions
|
@ -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)));
|
||||
|
|
Loading…
Add table
Reference in a new issue