Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2019-12-18 13:41:17 +01:00
parent 85742a0d57
commit 1e7467ee11

View File

@ -226,12 +226,7 @@ pub fn create_dir<P: AsRef<Path>>(path: P, options: CreateOptions) -> Result<(),
.unwrap_or(stat::Mode::from_bits_truncate(0o770));
let path = path.as_ref();
match nix::unistd::mkdir(path, mode) {
Ok(()) => {}
err => return err,
}
nix::unistd::mkdir(path, mode)?;
unistd::chown(path, options.owner, options.group)?;
Ok(())