-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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: Stat() returns inconsistent error on Windows #29119
Comments
FYI This does not happen in version 1.10.3
|
This does not happen on the tip either (I am using 9be01c2)
Alex |
@alexbrainman I just saw that the test i wrote failed. So this is not an issue in the latest master but was only an issue in the 1.11 release? |
This issues does exists in go1.11. But, I believe, it has been fixed on current tip. Alex |
@alexbrainman oh so should I just close the PR? |
I think your PR is not need. There is no problem here to fix. Alex |
@alexbrainman ok will close it then. @Xjs seems like this is fixed in |
There's a bug in go1.11 that causes some io operations on windows to return incorrect errors for some cases when Stat-ing files. To avoid upgrading to go1.12 in a point release, here we loosen up the cases where we will attempt to create fifos, and add some logging of underlying stat errors to help with debugging.
logmon: Workaround golang/go#29119
Revert e012612 now that we are running with Golang 1.12, and golang/go#29119 is no longer relevant.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Execute the following program under Windows:
What did you expect to see?
All four lines should output the same error message. (Like on https://play.golang.org/p/X0RVDSjWRmi)
What did you see instead?
The second line (
os.Stat("doesnotexist/")
) produces a different error. Particularlyos.IsNotExist(os.Stat("relative_path_that_doesnt_exist_and_ends_in_a_slash/"))
is unexpectedlyfalse
.Linux and macOS behave as expected.
The text was updated successfully, but these errors were encountered: