Alexandre Julliard : ntdll: Don' t bother to check the file name against the mask if stat() succeeded.

Alexandre Julliard julliard at winehq.org
Mon Jun 30 08:27:50 CDT 2008


Module: wine
Branch: master
Commit: d350998cec9243c9adc7c3d81254927a3591f391
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=d350998cec9243c9adc7c3d81254927a3591f391

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Jun 30 15:10:50 2008 +0200

ntdll: Don't bother to check the file name against the mask if stat() succeeded.

---

 dlls/ntdll/directory.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c
index 2b53245..0e99c4f 100644
--- a/dlls/ntdll/directory.c
+++ b/dlls/ntdll/directory.c
@@ -1508,7 +1508,7 @@ static int read_directory_stat( int fd, IO_STATUS_BLOCK *io, void *buffer, ULONG
         ret = stat( unix_name, &st );
         if (!ret)
         {
-            FILE_BOTH_DIR_INFORMATION *info = append_entry( buffer, &io->Information, length, unix_name, NULL, mask );
+            FILE_BOTH_DIR_INFORMATION *info = append_entry( buffer, &io->Information, length, unix_name, NULL, NULL );
             if (info)
             {
                 info->NextEntryOffset = 0;
@@ -1517,6 +1517,7 @@ static int read_directory_stat( int fd, IO_STATUS_BLOCK *io, void *buffer, ULONG
                 else
                     lseek( fd, 1, SEEK_CUR );
             }
+            else io->u.Status = STATUS_NO_MORE_FILES;
         }
     }
     else ret = -1;




More information about the wine-cvs mailing list