[PATCH 2/2] ntdll: Use swapping method to return . and .. as first entries.

Alexandre Julliard julliard at winehq.org
Fri Jul 22 04:30:00 CDT 2011


Grazvydas Ignotas <notasas at gmail.com> writes:

> @@ -1522,76 +1538,76 @@ static int read_directory_getdents( int fd, IO_STATUS_BLOCK *io, void *buffer, U
>      }
>  
>      io->u.Status = STATUS_SUCCESS;
> +    de = (KERNEL_DIRENT64 *)data;
>  
> +    /* read first 2 entries so we can handle "." and ".." */
> +    lseek( fd, 0, SEEK_SET );
>      res = getdents64( fd, data, size );

You should find a way to do this only when you do encounter '.' and
'..', not on every call.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list