mirror of
https://github.com/uutils/coreutils
synced 2025-01-18 16:14:13 +00:00
mkdir: permissions respects umask
- hardcoded default permissions changed to ones defined by umask
This commit is contained in:
parent
155647f6a8
commit
ea175ce252
1 changed files with 5 additions and 2 deletions
|
@ -64,7 +64,10 @@ fn get_mode(matches: &ArgMatches, mode_had_minus_prefix: bool) -> Result<u32, St
|
|||
}
|
||||
Ok(new_mode)
|
||||
}
|
||||
None => Ok(DEFAULT_PERM),
|
||||
None => {
|
||||
// If no mode argument is specified return the mode from umask
|
||||
Ok(mode::get_umask())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -119,7 +122,7 @@ pub fn uu_app<'a>() -> App<'a> {
|
|||
.short('m')
|
||||
.long(options::MODE)
|
||||
.help("set file mode (not implemented on windows)")
|
||||
.default_value("755"),
|
||||
.takes_value(true),
|
||||
)
|
||||
.arg(
|
||||
Arg::new(options::PARENTS)
|
||||
|
|
Loading…
Reference in a new issue