Skip to content

Commit 85486be

Browse files
committed
Mask mode by 0o7777 because of incompatible change of Rust
See: rust-lang/rust#44625 rust-lang/rust#45330
1 parent a8f0ed4 commit 85486be

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/provider/file/inline/posix.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ impl Posix {
8282

8383
impl InlineProvider for Posix {
8484
fn mode(&self, name: &str) -> Result<Output, Error> {
85-
let res = try!(fs::metadata(name).map(|m| Output::I32(m.permissions().mode() as i32)));
85+
let res = try!(fs::metadata(name)
86+
.map(|m| Output::I32((m.permissions().mode() & 0o7777) as i32)));
8687
Ok(res)
8788
}
8889

0 commit comments

Comments
 (0)