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

@zhangsen zhangsen commented Sep 18, 2015

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

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Oct 10, 2015

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

@bradfitz bradfitz closed this in 735c65f Oct 10, 2015
@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
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.