aboutsummaryrefslogtreecommitdiff
path: root/src/path/filepath/path.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/path/filepath/path.go')
-rw-r--r--src/path/filepath/path.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/path/filepath/path.go b/src/path/filepath/path.go
index b56534dead..0554deb2ff 100644
--- a/src/path/filepath/path.go
+++ b/src/path/filepath/path.go
@@ -396,6 +396,9 @@ func walkDir(path string, d fs.DirEntry, walkDirFn fs.WalkDirFunc) error {
// Second call, to report ReadDir error.
err = walkDirFn(path, d, err)
if err != nil {
+ if err == SkipDir && d.IsDir() {
+ err = nil
+ }
return err
}
}