Stathis Kamperis <ekamperi@gmail.com> added the comment:
Hey all.
First, EPERM shouldn't be returned at all; instead EACCES should.
Second, POSIX says that the order of error detection is undefined. So, we may
choose to check first the permissions and then if directory exists, or the other
way around. Both are valid.
My 2 cents.
_____________________________________________________
DragonFly issue tracker <bugs@lists.dragonflybsd.org>
<http://bugs.dragonflybsd.org/issue1701>
_____________________________________________________