* opendir() is supposed to return ENOTDIR if the given path is not

a directory, we returned EINVAL instead, which caused Perl's internal
  glob() implementation to fail prematurely
+alphabranch (will do that myself in a minute)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32999 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Oliver Tappe 2009-09-08 15:59:51 +00:00
parent 6ab71ad3b7
commit be628a94e2

View File

@ -123,7 +123,10 @@ opendir(const char* path)
int fd = _kern_open_dir(-1, path);
if (fd < 0) {
errno = fd;
if (fd == B_BAD_VALUE)
errno = B_NOT_A_DIRECTORY;
else
errno = fd;
return NULL;
}