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

Closed
perillo opened this issue Mar 25, 2016 · 1 comment
Closed

os: missing ENOTEMPTY check in IsExist function #14970

perillo opened this issue Mar 25, 2016 · 1 comment
Milestone

Comments

@perillo
Copy link
Contributor

perillo commented Mar 25, 2016

According to http://pubs.opengroup.org/onlinepubs/9699919799/functions/rename.html, 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
@gopherbot
Copy link

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

@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.
Projects
None yet
Development

No branches or pull requests

4 participants