* 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:
parent
4797a77c28
commit
5f5c6f7fa9
|
@ -1,3 +1,10 @@
|
|||
2005-08-22 Christopher Faylor <cgf@timesys.com>
|
||||
|
||||
* 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.
|
||||
|
||||
2005-08-22 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* mtinfo.h (mtinfo_drive::error): Fix argument bug in debug_printf call.
|
||||
|
|
|
@ -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))
|
||||
{
|
||||
|
|
|
@ -1399,8 +1399,11 @@ fhandler_disk_file::readdir (DIR *dir, dirent *de)
|
|||
else
|
||||
{
|
||||
res = geterrno_from_win_error ();
|
||||
FindClose (dir->__handle);
|
||||
dir->__handle = INVALID_HANDLE_VALUE;
|
||||
if (res != ENMFILE)
|
||||
{
|
||||
FindClose (dir->__handle);
|
||||
dir->__handle = INVALID_HANDLE_VALUE;
|
||||
}
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue