Skip to content

Commit

Permalink
fix: filetype, coloring for executables and folder
Browse files Browse the repository at this point in the history
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?= <darkdiscover@gmail.com>
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
  • Loading branch information
cafkafk and jschpp committed Oct 18, 2024
1 parent 7dbf234 commit f80b882
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fs/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit f80b882

Please sign in to comment.