make walk_dir not return self
This commit is contained in:
parent
85d7d944b4
commit
0b038f8663
|
@ -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) {
|
func walk_dir(dir string, f *filter.Filter) (files Files) {
|
||||||
err := filepath.WalkDir(dir, func(path string, d fs.DirEntry, err error) error {
|
err := filepath.WalkDir(dir, func(path string, d fs.DirEntry, err error) error {
|
||||||
|
if dir == path {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
p, e := filepath.Abs(path)
|
p, e := filepath.Abs(path)
|
||||||
if e != nil {
|
if e != nil {
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in a new issue