Skip to content

Commit 6ae9fc2

Browse files
committed
Remove st_mode mask
1 parent 04c01e0 commit 6ae9fc2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/libstd/sys/unix/ext/fs.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ impl FileExt for fs::File {
6868
/// Unix-specific extensions to `Permissions`
6969
#[stable(feature = "fs_ext", since = "1.1.0")]
7070
pub trait PermissionsExt {
71-
/// Returns the 12 least significant bits of `st_mode` which are the
72-
/// standard Unix permissions for this file.
71+
/// Returns the underlying raw `st_mode` bits that contain the standard
72+
/// Unix permissions for this file.
7373
///
7474
/// # Examples
7575
///

src/libstd/sys/unix/fs.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ pub struct DirBuilder { mode: mode_t }
9595
impl FileAttr {
9696
pub fn size(&self) -> u64 { self.stat.st_size as u64 }
9797
pub fn perm(&self) -> FilePermissions {
98-
FilePermissions { mode: (self.stat.st_mode as mode_t) & 0o7777 }
98+
FilePermissions { mode: (self.stat.st_mode as mode_t) }
9999
}
100100

101101
pub fn file_type(&self) -> FileType {

0 commit comments

Comments
 (0)