From dfed84eb74e58fc8d3fef4f427d9a739589253c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lilian=20J=C3=B3nsd=C3=B3ttir?= Date: Mon, 15 Jul 2024 16:20:46 -0700 Subject: [PATCH] make -H option work right --- internal/files/disk.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/files/disk.go b/internal/files/disk.go index 1dedc37..633eb91 100644 --- a/internal/files/disk.go +++ b/internal/files/disk.go @@ -89,9 +89,9 @@ func FindDisk(dir string, recursive bool, f *filter.Filter) (files Files, err er return } -// is_in_recursive_dir checks `path` and parent directories +// is_in_hidden_dir checks `path` and parent directories // of `path` up to `base` for a hidden parent -func is_in_recursive_dir(base, path string) bool { +func is_in_hidden_dir(base, path string) bool { me := path for { me = filepath.Clean(me) @@ -112,7 +112,7 @@ func walk_dir(dir string, f *filter.Filter) (files Files) { return nil } - if is_in_recursive_dir(dir, path) && !f.IgnoreHidden() { + if is_in_hidden_dir(dir, path) && f.IgnoreHidden() { return nil }