make walk_dir not return self

This commit is contained in:
Lilian Jónsdóttir 2024-06-19 20:24:15 -07:00
parent 85d7d944b4
commit 0b038f8663

View file

@ -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