With this, ReadDir will fail a tad earlier (on open rather than on
readdir syscall). This should be the only effect of this change.
Change-Id: Icf2870f47ea6c19aad29670e78ba9bfcc13c0ac3
Reviewed-on: https://go-review.googlesource.com/c/go/+/588915
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
e error
)
ignoringEINTR(func() error {
- r, s, e = open(name, O_RDONLY|syscall.O_CLOEXEC, 0)
+ r, s, e = open(name, O_RDONLY|syscall.O_CLOEXEC|syscall.O_DIRECTORY, 0)
return e
})
if e != nil {