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 <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Reviewed-by: Junyang Shao <[email protected]> Auto-Submit: Tobias Klauser <[email protected]>
1 parent 705fa92 commit e690884

File tree

3 files changed

+1
-6
lines changed

3 files changed

+1
-6
lines changed

Diff for: src/os/dir.go

-4
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,

Diff for: src/os/export_test.go

-1
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() {

Diff for: src/os/file_unix.go

+1-1
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)