Close writer on error during write.
This commit is contained in:
parent
e9a1de4e1b
commit
a74045654f
1 changed files with 1 additions and 0 deletions
|
@ -176,6 +176,7 @@ impl<W: Write + io::Seek> Write for ZipWriter<W> {
|
|||
if self.stats.bytes_written > 0xFFFFFFFF
|
||||
&& !self.files.last_mut().unwrap().large_file
|
||||
{
|
||||
let _inner = mem::replace(&mut self.inner, GenericZipWriter::Closed);
|
||||
return Err(io::Error::new(
|
||||
io::ErrorKind::Other,
|
||||
"Large file option has not been set",
|
||||
|
|
Loading…
Add table
Reference in a new issue