pxar: less confusing logic
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
521a0acb2e
commit
1008a69a13
@ -452,10 +452,10 @@ impl<'a, 'b> Archiver<'a, 'b> {
|
||||
use pxar::format::mode;
|
||||
|
||||
let file_mode = stat.st_mode & libc::S_IFMT;
|
||||
let open_mode = if !(file_mode == libc::S_IFREG || file_mode == libc::S_IFDIR) {
|
||||
OFlag::O_PATH
|
||||
} else {
|
||||
let open_mode = if file_mode == libc::S_IFREG || file_mode == libc::S_IFDIR {
|
||||
OFlag::empty()
|
||||
} else {
|
||||
OFlag::O_PATH
|
||||
};
|
||||
|
||||
let fd = self.open_file(
|
||||
|
Loading…
Reference in New Issue
Block a user