ENOTDIR
pathname, or a component used as a directory in
pathname, is not, in fact, a directory.
ENOTEMPTY
pathname contains entries other than . and .. .
meaning what we really want to return here is ENOTEMPTY
====================
This delta was composed from multiple commits as part of the CVS->Git migration.
The checkin message with each commit was inconsistent.
The following are the additional commit messages.
====================
AFS_GLOCK();
code = afs_rmdir((struct vcache*)dip, name, credp);
- /* Linux likes to see ENOTDIR returned from an rmdir() syscall
+ /* Linux likes to see ENOTEMPTY returned from an rmdir() syscall
* that failed because a directory is not empty. So, we map
- * EEXIST to ENOTDIR on linux.
+ * EEXIST to ENOTEMPTY on linux.
*/
if (code == EEXIST) {
- code = ENOTDIR;
+ code = ENOTEMPTY;
}
if (!code) {