-
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
syscall/syscall_windows: add ERROR_INVALID_NAME to oserror.ErrNotExist #71108
base: master
Are you sure you want to change the base?
Conversation
1.Moved the declaration of the variable ERROR_INVALID_NAME 2.ERROR_INVALID_NAME is also an Errno error
This PR (HEAD: 148fe75) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/639975. Important tips:
|
Message from Gopher Robot: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/639975. |
Message from Para Peng: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/639975. |
Message from Ingo Oeser: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/639975. |
Message from Para Peng: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/639975. |
The following is an example of checking if a file exists:
On macos/linux it works perfectly,
os.IsNotExist(err)
return trueIn windows,
os.IsNotExist(err)
return falsean ERROR_INVALID_NAME error will appear.
it was not an ErrNotExist error before.
src/internal/syscall/windows/syscall_windows.go