* 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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user