os: File.Seek() not resetting directory reads on MacOS Catalina #35767
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
OS-Darwin
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
This is the latest.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
This piece of code opens a directory file and calls
f.Readdirnames(0)
. Then it callsf.Seek(0, 0)
to reset to the head of the file, and callsf.Readdirnames(0)
again.https://play.golang.org/p/IEb3BH2Jlxg
What did you expect to see?
On Linux, the playground, and earlier versions of MacOS, the second call to
f.Readdirnames(0)
returns the same directory list as the first call:What did you see instead?
On MacOS 10.15.1 Catalina, the second call returns an empty list:
The text was updated successfully, but these errors were encountered: