From 680adb7b1ea4f33f45bb48a5b9110e318d519c2d Mon Sep 17 00:00:00 2001 From: mike-ward Date: Mon, 1 Jul 2024 19:24:15 -0500 Subject: [PATCH] don't set executable if directory --- CHANGELOG.md | 5 +++++ lsv/entry.v | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0affe9c..739110e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to this project will be documented in this file. +###[Unreleased] + +### Fixed +- don't include excutable dirs in file byte count + ## [2024.2] ### Added - Always follow links. Color link and link origin separately diff --git a/lsv/entry.v b/lsv/entry.v index 4f4ff61..d1d5d70 100644 --- a/lsv/entry.v +++ b/lsv/entry.v @@ -73,7 +73,7 @@ fn make_entry(file string, dir_name string, args Args) Entry { is_socket := filetype == .socket is_character_device := filetype == .character_device is_unknown := filetype == .unknown - is_exe := is_executable(stat) + is_exe := !is_dir && is_executable(stat) is_file := !is_dir && !is_fifo && !is_block && !is_socket && !is_character_device && !is_unknown && !is_exe && !invalid indicator := if is_dir && args.dir_indicator { '/' } else { '' }