Fixed read_directory_getdents for large directories (found by Rein

Klazes).
This commit is contained in:
Alexandre Julliard 2004-12-09 16:54:20 +00:00
parent e849a56673
commit 50c1a6b959
1 changed files with 6 additions and 1 deletions

View File

@ -794,7 +794,12 @@ static int read_directory_getdents( int fd, IO_STATUS_BLOCK *io, void *buffer, U
}
old_pos = de->d_off;
/* move on to the next entry */
de = (KERNEL_DIRENT64 *)((char *)de + de->d_reclen);
if (res > 0) de = (KERNEL_DIRENT64 *)((char *)de + de->d_reclen);
else
{
res = getdents64( fd, data, size );
de = data;
}
}
if (last_info) last_info->NextEntryOffset = 0;