ntdll: Handle errno also for non ENOENT errors on lseek (Coverity).

oldstable
Marcus Meissner 2011-08-30 16:41:29 +02:00 committed by Alexandre Julliard
parent ee12b4feed
commit 956487434d
1 changed files with 2 additions and 2 deletions

View File

@ -1547,9 +1547,9 @@ static int read_directory_getdents( int fd, IO_STATUS_BLOCK *io, void *buffer, U
else
{
old_pos = lseek( fd, 0, SEEK_CUR );
if (old_pos == -1 && errno == ENOENT)
if (old_pos == -1)
{
io->u.Status = STATUS_NO_MORE_FILES;
io->u.Status = (errno == ENOENT) ? STATUS_NO_MORE_FILES : FILE_GetNtStatus();
res = 0;
goto done;
}