Skip to content

Commit e690884

Browse files
tklausergopherbot
authored andcommitted
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>
1 parent 705fa92 commit e690884

File tree

3 files changed

+1
-6
lines changed

3 files changed

+1
-6
lines changed

src/os/dir.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,6 @@ func (f *File) ReadDir(n int) ([]DirEntry, error) {
106106
return dirents, err
107107
}
108108

109-
// testingForceReadDirLstat forces ReadDir to call Lstat, for testing that code path.
110-
// This can be difficult to provoke on some Unix systems otherwise.
111-
var testingForceReadDirLstat bool
112-
113109
// ReadDir reads the named directory,
114110
// returning all its directory entries sorted by filename.
115111
// If an error occurs reading the directory,

src/os/export_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ package os
99
var Atime = atime
1010
var LstatP = &lstat
1111
var ErrWriteAtInAppendMode = errWriteAtInAppendMode
12-
var TestingForceReadDirLstat = &testingForceReadDirLstat
1312
var ErrPatternHasSeparator = errPatternHasSeparator
1413

1514
func init() {

src/os/file_unix.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ func newUnixDirent(parent, name string, typ FileMode) (DirEntry, error) {
482482
name: name,
483483
typ: typ,
484484
}
485-
if typ != ^FileMode(0) && !testingForceReadDirLstat {
485+
if typ != ^FileMode(0) {
486486
return ude, nil
487487
}
488488

0 commit comments

Comments
 (0)