Skip to content
This repository was archived by the owner on Jun 2, 2024. It is now read-only.

Commit c1aef97

Browse files
committed
fix: permissions are not copied
- fix a small bug when permissions where not copied Tested: - No
1 parent f331802 commit c1aef97

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/write.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -614,11 +614,11 @@ impl<W: Write + io::Seek> ZipWriter<W> {
614614
where
615615
S: Into<String>,
616616
{
617-
let options = FileOptions::default()
617+
let mut options = FileOptions::default()
618618
.last_modified_time(file.last_modified())
619619
.compression_method(file.compression());
620620
if let Some(perms) = file.unix_mode() {
621-
options.unix_permissions(perms);
621+
options = options.unix_permissions(perms);
622622
}
623623

624624
let raw_values = ZipRawValues {

0 commit comments

Comments
 (0)