diff --git a/src/write.rs b/src/write.rs index bbbef3aa..ddf46a50 100644 --- a/src/write.rs +++ b/src/write.rs @@ -1455,8 +1455,8 @@ impl ZipWriter { self.finish_file()?; let src_index = self.index_by_name(src_name)?; let mut dest_data = self.files[src_index].to_owned(); - dest_data.file_name = dest_name.into(); - dest_data.file_name_raw = dest_name.into(); + dest_data.file_name = dest_name.to_string().into(); + dest_data.file_name_raw = dest_name.into_boxed_bytes(); self.insert_file_data(dest_data)?; Ok(()) }