Skip to content

Commit 6087ffb

Browse files
committed
Upgrade nix to 0.27
1 parent 3a21071 commit 6087ffb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ categories = ["filesystem"]
1515
rand = { version = "0.8" }
1616

1717
[target.'cfg(unix)'.dependencies]
18-
nix = { version = "0.26" }
18+
nix = { version = "0.27", features = ["fs", "user"] }
1919

2020
[features]
2121
default = ["unnamed-tmpfile"]

src/imp/unix/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ fn copy_file_perms<P: AsRef<Path>>(
175175
Err(err) => return Err(err.into()),
176176
};
177177
if opts.preserve_mode {
178-
let mode = unsafe { Mode::from_bits_unchecked(stat.st_mode) };
178+
let mode = Mode::from_bits_retain(stat.st_mode);
179179
fchmod(copy_to.as_raw_fd(), mode)?;
180180
}
181181
if opts.preserve_owner.is_yes() {

0 commit comments

Comments
 (0)