Patch from Raghu for 1st part of bug #2886. 'cd file' returns now "Not a directory".

The check is done in the same way in bash 3.2.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30232 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval
2009-04-17 21:06:07 +00:00
parent a56942d497
commit f1bd4cfe8c
+2 -1
View File
@@ -398,7 +398,8 @@ change_to_directory (newdir, nolinks)
resolved path doesn't exist), fail immediately. */
if (posixly_correct && nolinks == 0 && canon_failed)
{
errno = ENOENT;
if (errno != ENOENT)
errno = ENOTDIR;
return (0);
}