* dir.cc (readdir_worker): Make static. Only add '.' and '..' when readdir

fails due to ENMFILE.
* fhandler_disk_file.cc (fhandler_disk_file::readdir): Only close handle on
error != ENMFILE.
This commit is contained in:
Christopher Faylor
2005-08-23 03:58:09 +00:00
parent 4797a77c28
commit 5f5c6f7fa9
3 changed files with 14 additions and 4 deletions

View File

@@ -65,7 +65,7 @@ opendir (const char *name)
return res;
}
int
static int
readdir_worker (DIR *dir, dirent *de)
{
myfault efault;
@@ -80,7 +80,7 @@ readdir_worker (DIR *dir, dirent *de)
int res = ((fhandler_base *) dir->__fh)->readdir (dir, de);
if (res)
if (res == ENMFILE)
{
if (!(dir->__flags & dirent_saw_dot))
{