diff --git a/src/write.rs b/src/write.rs index 664648d6..729d9395 100644 --- a/src/write.rs +++ b/src/write.rs @@ -348,9 +348,7 @@ impl ZipWriter { self.abort_file().unwrap(); return Err(e.into()); } - self.writing_to_file = false; - self.writing_raw = false; - Ok(()) + self.finish_file() } }