[PATCH v3] ntdll: Only fail lookup_unix_name() early if we actually tried stat().

Zebediah Figura z.figura12 at gmail.com
Wed Apr 3 21:07:55 CDT 2019


Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46863
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
This supersedes patch 161955.

 dlls/ntdll/directory.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c
index b46c2a6736..2df9c21a38 100644
--- a/dlls/ntdll/directory.c
+++ b/dlls/ntdll/directory.c
@@ -2646,14 +2646,14 @@ static NTSTATUS lookup_unix_name( const WCHAR *name, int name_len, char **buffer
                     return STATUS_OBJECT_NAME_COLLISION;
                 return STATUS_SUCCESS;
             }
+
+            if (!name_len)  /* empty name -> drive root doesn't exist */
+                return STATUS_OBJECT_PATH_NOT_FOUND;
+            if (check_case && !redirect && (disposition == FILE_OPEN || disposition == FILE_OVERWRITE))
+                return STATUS_OBJECT_NAME_NOT_FOUND;
         }
     }
 
-    if (!name_len)  /* empty name -> drive root doesn't exist */
-        return STATUS_OBJECT_PATH_NOT_FOUND;
-    if (check_case && !redirect && (disposition == FILE_OPEN || disposition == FILE_OVERWRITE))
-        return STATUS_OBJECT_NAME_NOT_FOUND;
-
     /* now do it component by component */
 
     while (name_len)
-- 
2.20.1




More information about the wine-devel mailing list