Skip to content
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: IsNotExist doesn't recognize SyscallError #12674

Closed
zhangsen opened this issue Sep 18, 2015 · 1 comment
Closed

os: IsNotExist doesn't recognize SyscallError #12674

zhangsen opened this issue Sep 18, 2015 · 1 comment
Milestone

Comments

@zhangsen
Copy link

os.RemoveAll may return a SyscallError(NOENT) when the directory it's working on gets deleted. RemoveAll calls Readdirnames which calls readdirnames which could return SyscallError. Since SyscallError could contain a NOENT error, it should be handled by os.IsNotExist.

Happened on a linux machine.

@ianlancetaylor ianlancetaylor added this to the Go1.6 milestone Sep 18, 2015
@ianlancetaylor ianlancetaylor changed the title os.IsNotExist doesn't recognize SyscallError os: IsNotExist doesn't recognize SyscallError Sep 18, 2015
@gopherbot
Copy link

CL https://golang.org/cl/15730 mentions this issue.

@golang golang locked and limited conversation to collaborators Oct 9, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants