mirror of https://github.com/golang/go.git
os: remove unused testingForceReadDirLstat
It was introduced in CL 261540 but never set by any test. Change-Id: Id2a59c58ed510b6041cc51ce47ab79199a60b215 Reviewed-on: https://go-review.googlesource.com/c/go/+/655797 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Junyang Shao <shaojunyang@google.com> Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
This commit is contained in:
parent
705fa920c1
commit
e6908846df
|
|
@ -106,10 +106,6 @@ func (f *File) ReadDir(n int) ([]DirEntry, error) {
|
|||
return dirents, err
|
||||
}
|
||||
|
||||
// testingForceReadDirLstat forces ReadDir to call Lstat, for testing that code path.
|
||||
// This can be difficult to provoke on some Unix systems otherwise.
|
||||
var testingForceReadDirLstat bool
|
||||
|
||||
// ReadDir reads the named directory,
|
||||
// returning all its directory entries sorted by filename.
|
||||
// If an error occurs reading the directory,
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ package os
|
|||
var Atime = atime
|
||||
var LstatP = &lstat
|
||||
var ErrWriteAtInAppendMode = errWriteAtInAppendMode
|
||||
var TestingForceReadDirLstat = &testingForceReadDirLstat
|
||||
var ErrPatternHasSeparator = errPatternHasSeparator
|
||||
|
||||
func init() {
|
||||
|
|
|
|||
|
|
@ -482,7 +482,7 @@ func newUnixDirent(parent, name string, typ FileMode) (DirEntry, error) {
|
|||
name: name,
|
||||
typ: typ,
|
||||
}
|
||||
if typ != ^FileMode(0) && !testingForceReadDirLstat {
|
||||
if typ != ^FileMode(0) {
|
||||
return ude, nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue