From 8ae727e462b38541636c8e03d140953cad8f34cf Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Mon, 25 Dec 2023 08:07:50 +0100 Subject: fix: keep checking for existance of entries outside of the glob top-level. The glob top-level is used to display all search results which means that there can be a lot of them, which would unnecessarily slow down the search operation. Previously it would never check for the existence of an entry in glob mode, but now it will do so outside of the top-level. --- src/interactive/app/common.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/interactive/app/common.rs b/src/interactive/app/common.rs index 3b79a9a..99d0d6b 100644 --- a/src/interactive/app/common.rs +++ b/src/interactive/app/common.rs @@ -76,7 +76,7 @@ pub fn sorted_entries( let use_glob_path = glob_root.map_or(false, |glob_root| glob_root == node_idx); let (path, exists, is_dir) = { let path = path_of(tree, idx, glob_root); - if glob_root.is_some() { + if glob_root == Some(node_idx) { (path, true, entry.is_dir) } else { let meta = path.symlink_metadata(); -- cgit v1.2.3