diff options
Diffstat (limited to 'libgo/go/path/filepath/path.go')
-rw-r--r-- | libgo/go/path/filepath/path.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libgo/go/path/filepath/path.go b/libgo/go/path/filepath/path.go index a4e429baec1..815021bd040 100644 --- a/libgo/go/path/filepath/path.go +++ b/libgo/go/path/filepath/path.go @@ -320,8 +320,11 @@ func walk(path string, info os.FileInfo, walkFn WalkFunc) error { } for _, fileInfo := range list { - if err = walk(Join(path, fileInfo.Name()), fileInfo, walkFn); err != nil { - return err + err = walk(Join(path, fileInfo.Name()), fileInfo, walkFn) + if err != nil { + if !fileInfo.IsDir() || err != SkipDir { + return err + } } } return nil |