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: missing ENOTEMPTY check in IsExist function #14970

perillo opened this issue Mar 25, 2016 · 1 comment

os: missing ENOTEMPTY check in IsExist function #14970

perillo opened this issue Mar 25, 2016 · 1 comment


Copy link

@perillo perillo commented Mar 25, 2016

According to, the rename function may return EEXIST or ENOTEMPTY when "The link named by new is a directory that is not an empty directory".

On Linux 4.4.5 x86_64 I'm getting ENOTEMPTY, and so the os.IsExist function returns false. It should probably return true.

The same issue apply to the rmdir function.

A search on the online version of The Open Group Base Specifications Issue 7, reveals that ENOTEMPTY is only returned by the rmdir, rename, renameat, unlink and unlinkat functions.

@ianlancetaylor ianlancetaylor added this to the Go1.7 milestone Mar 26, 2016
@bradfitz bradfitz self-assigned this Apr 3, 2016

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Apr 3, 2016

CL mentions this issue.

@gopherbot gopherbot closed this in 7c15b2a Apr 3, 2016
@golang golang locked and limited conversation to collaborators Apr 3, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

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