]> Cypherpunks repositories - gostls13.git/commit
path/filepath: ensure Walk report unreadable directories once
authorWei Congrui <crvv.mail@gmail.com>
Fri, 15 Sep 2017 07:36:16 +0000 (15:36 +0800)
committerIan Lance Taylor <iant@golang.org>
Mon, 25 Sep 2017 18:20:32 +0000 (18:20 +0000)
commit5db7572ddfd431e14febbf5f006e0408c5f1ae1b
treea79e2f8a36e8840d8fdf2c20fb1815b9bd2ded95
parentb71f39612adb671c176586cd9b0018eb3c716f3c
path/filepath: ensure Walk report unreadable directories once

Before this change, if Walk encounters an unreadable directory,
it will call walkFn with this directory twice. Argument err in
the first call is nil, and the second is the permission error.

This change removes the former call and makes Walk call walkFn
with permission error.

Fixes #21758

Change-Id: I21e57c67f3c5a8370fc80a43db3c8009fbce6439
Reviewed-on: https://go-review.googlesource.com/63994
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/path/filepath/path.go
src/path/filepath/path_test.go