* 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:
@@ -123,7 +123,10 @@ opendir(const char* path)
|
|||||||
|
|
||||||
int fd = _kern_open_dir(-1, path);
|
int fd = _kern_open_dir(-1, path);
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
errno = fd;
|
if (fd == B_BAD_VALUE)
|
||||||
|
errno = B_NOT_A_DIRECTORY;
|
||||||
|
else
|
||||||
|
errno = fd;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user