update to nix 0.24

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
Fabian Grünbichler 2022-06-02 13:36:44 +02:00
parent 84c52f3810
commit b67ff27d9e
4 changed files with 4 additions and 4 deletions

View File

@ -22,7 +22,7 @@ crate-type = [ "cdylib" ]
anyhow = "1.0"
hex = "0.4"
libc = "0.2"
nix = "0.19"
nix = "0.24"
serde = "1.0"
serde_bytes = "0.11.3"
serde_json = "1.0"

View File

@ -382,7 +382,7 @@ pub(crate) fn mkdir<P: AsRef<Path>>(path: P, mode: libc::mode_t) -> Result<(), E
let path = path.as_ref();
match nix::unistd::mkdir(path, unsafe { Mode::from_bits_unchecked(mode) }) {
Ok(()) => Ok(()),
Err(nix::Error::Sys(Errno::EEXIST)) => Ok(()),
Err(Errno::EEXIST) => Ok(()),
Err(err) => bail!("failed to create directory {:?}: {}", path, err),
}
}

View File

@ -20,7 +20,7 @@ base32 = "0.4"
base64 = "0.13"
hex = "0.4"
libc = "0.2"
nix = "0.19"
nix = "0.24"
serde = "1.0"
serde_bytes = "0.11"
serde_json = "1.0"

View File

@ -783,7 +783,7 @@ pub(crate) fn mkdir<P: AsRef<Path>>(path: P, mode: libc::mode_t) -> Result<(), E
let path = path.as_ref();
match nix::unistd::mkdir(path, unsafe { Mode::from_bits_unchecked(mode) }) {
Ok(()) => Ok(()),
Err(nix::Error::Sys(Errno::EEXIST)) => Ok(()),
Err(Errno::EEXIST) => Ok(()),
Err(err) => bail!("failed to create directory {:?}: {}", path, err),
}
}