pxar: less confusing logic

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2020-07-08 09:58:29 +02:00
parent 521a0acb2e
commit 1008a69a13

View File

@ -452,10 +452,10 @@ impl<'a, 'b> Archiver<'a, 'b> {
use pxar::format::mode; use pxar::format::mode;
let file_mode = stat.st_mode & libc::S_IFMT; let file_mode = stat.st_mode & libc::S_IFMT;
let open_mode = if !(file_mode == libc::S_IFREG || file_mode == libc::S_IFDIR) { let open_mode = if file_mode == libc::S_IFREG || file_mode == libc::S_IFDIR {
OFlag::O_PATH
} else {
OFlag::empty() OFlag::empty()
} else {
OFlag::O_PATH
}; };
let fd = self.open_file( let fd = self.open_file(