mkdir: permissions respects umask
hardcoded default permissions changed to ones defined by umask
@@ -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)
