-
Notifications
You must be signed in to change notification settings - Fork 17.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
os: File.Seek() not resetting directory reads on MacOS Catalina #35767
Comments
cc @odeke-em @eliasnaur @ianlancetaylor |
I guess this is not a 1.14 release blocker since it is broken in 1.13, but it would be nice to fix. CC @randall77 |
Out of curiosity, I tested |
I think the problem here is that the first
|
Change https://golang.org/cl/209961 mentions this issue: |
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: