From 0b038f86636df75f7f7d38bbf92af79f89821c98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lilian=20J=C3=B3nsd=C3=B3ttir?= Date: Wed, 19 Jun 2024 20:24:15 -0700 Subject: [PATCH] make walk_dir not return self --- internal/files/files.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/files/files.go b/internal/files/files.go index 853379f..7f8a1c9 100644 --- a/internal/files/files.go +++ b/internal/files/files.go @@ -55,6 +55,10 @@ func Find(dir string, recursive bool, f *filter.Filter) (files Files, err error) func walk_dir(dir string, f *filter.Filter) (files Files) { err := filepath.WalkDir(dir, func(path string, d fs.DirEntry, err error) error { + if dir == path { + return nil + } + p, e := filepath.Abs(path) if e != nil { return err