* path.cc (chdir): Don't allow cd'ing to a non-directory virtual path.

This commit is contained in:
Christopher Faylor 2002-06-01 18:20:51 +00:00
parent 84c32f5906
commit 60abf1c4b8
2 changed files with 9 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2002-06-01 Christopher Faylor <cgf@redhat.com>
* path.cc (chdir): Don't allow cd'ing to a non-directory virtual path.
2002-05-31 Christopher Faylor <cgf@redhat.com>
* fhandler_disk_file.cc (readdir): Move inode calculation into caller.

View File

@ -3311,6 +3311,11 @@ chdir (const char *in_dir)
set_errno (ENOENT);
return -1;
}
else if (!path.isdir ())
{
set_errno (ENOTDIR);
return -1;
}
else
{
native_dir = "c:\\";