Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
os: missing ENOTEMPTY check in IsExist function #14970
According to http://pubs.opengroup.org/onlinepubs/9699919799/functions/rename.html, the rename function may return EEXIST or ENOTEMPTY when
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.