We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 69a68c2 commit 93c94c4Copy full SHA for 93c94c4
src/lib.rs
@@ -174,13 +174,12 @@ pub fn get_umask() -> Mode {
174
we've mostly escaped that particular circle of UNIX hell on modern systems.
175
*/
176
177
- if let Ok(status) = fs::read_to_string("/proc/self/status") {
178
- if let Some(umask) = status
+ if let Ok(status) = fs::read_to_string("/proc/self/status")
+ && let Some(umask) = status
179
.lines()
180
.find_map(|line| RawMode::from_str_radix(line.strip_prefix("Umask:")?.trim(), 8).ok())
181
- {
182
- return Mode::from_raw_mode(umask);
183
- }
+ {
+ return Mode::from_raw_mode(umask);
184
}
185
186
// Fallback method with a possible race condition
0 commit comments