From 1008a69a13d49494db654aa07ecb496183be9eeb Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Wed, 8 Jul 2020 09:58:29 +0200 Subject: [PATCH] pxar: less confusing logic Signed-off-by: Wolfgang Bumiller --- src/pxar/create.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pxar/create.rs b/src/pxar/create.rs index 19651695..8c5ea40b 100644 --- a/src/pxar/create.rs +++ b/src/pxar/create.rs @@ -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(