chore: shallow_copy_file needs to update file_name_raw

This commit is contained in:
Chris Hennick 2024-05-09 19:04:08 -07:00 committed by GitHub
parent 650dd9a71f
commit 34b99956c9
Signed by: DevComp
GPG key ID: B5690EEEBB952194

View file

@ -1456,6 +1456,7 @@ impl<W: Write + Seek> ZipWriter<W> {
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();
self.insert_file_data(dest_data)?;
Ok(())
}
@ -2179,7 +2180,7 @@ mod test {
v[54] = 10;
v[108] = 10;
v[158] = 10;
assert_eq!(result.get_ref(), &v);
}