POSIX documents that EINVAL be returned for rmdir('foo/.') but as far as I
can see from the link you sent it does not document the error status for
rmdir('foo/..') beyond saying that it shall fail.  As it happens, it returns
ENOTEMPTY on Linux.

OK, you point out that foo/. might not always be the same thing as foo.
How about this: if foo/. has the same inode number as foo then rmdir proceeds.
If not, it prints an error a bit more helpful than 'Invalid argument'.

-- 
Ed Avis <e...@waniasset.com>




Reply via email to