Bug fix: don't switch_to when deep copying

This commit is contained in:
Chris Hennick 2023-04-29 17:46:48 -07:00
parent b52464cf25
commit 6b4a07f2a7
No known key found for this signature in database
GPG key ID: 25653935CC8B6C74

View file

@ -341,7 +341,6 @@ impl<A: Read + Write + Seek> ZipWriter<A> {
reader.read_to_end(&mut copy)?; reader.read_to_end(&mut copy)?;
drop(reader); drop(reader);
self.start_entry(dest_name, options, Some(raw_values))?; self.start_entry(dest_name, options, Some(raw_values))?;
self.inner.switch_to(CompressionMethod::Stored, None)?;
self.writing_to_file = true; self.writing_to_file = true;
self.writing_raw = true; self.writing_raw = true;
Ok(self.write_all(&copy)?) Ok(self.write_all(&copy)?)