From f80b882a74ba7f004dc048d880ba43e9597a7f6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christina=20S=C3=B8rensen?= Date: Fri, 18 Oct 2024 04:31:05 +0200 Subject: [PATCH] fix: filetype, coloring for executables and folder MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When the reuse filetype code was introduced, an if statements logic was accidentally flipped, marking exectuables as folders, and folders as executables. This incorporates the proposed patch by jschpp in #1195. Refs: #883 Closes: #1195 #1196 Co-authored-by: =?UTF-8?q?Johannes=20Sch=C3=B6pp?= Signed-off-by: Christina Sørensen --- src/fs/file.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fs/file.rs b/src/fs/file.rs index 306d33e66..5cafcad20 100644 --- a/src/fs/file.rs +++ b/src/fs/file.rs @@ -334,7 +334,7 @@ impl<'dir> File<'dir> { #[cfg(unix)] pub fn is_executable_file(&self) -> bool { let bit = modes::USER_EXECUTE; - if self.is_file() { + if !self.is_file() { return false; } let Ok(md) = self.metadata() else {