mirror of
https://git.proxmox.com/git/proxmox
synced 2025-08-11 15:15:33 +00:00
tools fs: rust fmt
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
11dccc40b5
commit
3fd900d2b2
@ -211,11 +211,11 @@ pub fn atomic_open_or_create_file<P: AsRef<Path>>(
|
|||||||
match nix::fcntl::open(path, oflag, stat::Mode::empty()) {
|
match nix::fcntl::open(path, oflag, stat::Mode::empty()) {
|
||||||
Ok(fd) => return Ok(unsafe { File::from_raw_fd(fd) }),
|
Ok(fd) => return Ok(unsafe { File::from_raw_fd(fd) }),
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
if err.not_found() {
|
if err.not_found() {
|
||||||
// fall thrue - try to create the file
|
// fall thrue - try to create the file
|
||||||
} else {
|
} else {
|
||||||
bail!("open {:?} failed - {}", path, err);
|
bail!("open {:?} failed - {}", path, err);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user