]> Cypherpunks repositories - gostls13.git/commit
os, path/filepath: don't ignore Lstat errors in Readdir
authorBrad Fitzpatrick <bradfitz@golang.org>
Tue, 17 Dec 2013 20:19:01 +0000 (12:19 -0800)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 17 Dec 2013 20:19:01 +0000 (12:19 -0800)
commit6a1a2170bcd1fbbe7210d90939a485dadf5075fb
treea92d89a7c45168cc10a056ec361833dca6e9d854
parent762a9d934eab267418595df7a220eec50919b77d
os, path/filepath: don't ignore Lstat errors in Readdir

os: don't ignore LStat errors in Readdir. If it's ENOENT,
on the second pass, just treat it as missing. If it's another
error, it's real.

path/filepath: use ReaddirNames instead of Readdir in Walk,
in order to obey the documented WalkFunc contract of returning
each walked item's LStat error, if any.

Fixes #6656
Fixes #6680

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/43530043
src/pkg/os/file_unix.go
src/pkg/os/os_test.go
src/pkg/os/os_unix_test.go
src/pkg/path/filepath/export_test.go [new file with mode: 0644]
src/pkg/path/filepath/path.go
src/pkg/path/filepath/path_test.go