Gijs Vermeulen : msvcp: Set correct error code on non-existing path in _Open_dir.

Alexandre Julliard julliard at winehq.org
Fri Jan 25 16:29:07 CST 2019


Module: wine
Branch: master
Commit: 64aba27f6a99becb61a879d713bae39397920134
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=64aba27f6a99becb61a879d713bae39397920134

Author: Gijs Vermeulen <gijsvrm at gmail.com>
Date:   Fri Jan 25 17:51:40 2019 +0100

msvcp: Set correct error code on non-existing path in _Open_dir.

Signed-off-by: Gijs Vermeulen <gijsvrm at gmail.com>
Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/msvcp120/tests/msvcp120.c | 2 +-
 dlls/msvcp140/tests/msvcp140.c | 2 +-
 dlls/msvcp90/ios.c             | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/msvcp120/tests/msvcp120.c b/dlls/msvcp120/tests/msvcp120.c
index ac38aa6..6d72f9f 100644
--- a/dlls/msvcp120/tests/msvcp120.c
+++ b/dlls/msvcp120/tests/msvcp120.c
@@ -1837,7 +1837,7 @@ static void test_tr2_sys__dir_operation(void)
     result_handle = file;
     result_handle = p_tr2_sys__Open_dir(first_file_name, "not_exist", &err, &type);
     ok(result_handle == NULL, "tr2_sys__Open_dir(): expect: NULL, got %p\n", result_handle);
-    todo_wine ok(err == ERROR_BAD_PATHNAME, "tr2_sys__Open_dir(): expect: ERROR_BAD_PATHNAME, got %d\n", err);
+    ok(err == ERROR_BAD_PATHNAME, "tr2_sys__Open_dir(): expect: ERROR_BAD_PATHNAME, got %d\n", err);
     ok((int)type == 0xdeadbeef, "tr2_sys__Open_dir(): expect: 0xdeadbeef, got %d\n", type);
     ok(!*first_file_name, "tr2_sys__Open_dir(): expect: 0, got %s\n", first_file_name);
 
diff --git a/dlls/msvcp140/tests/msvcp140.c b/dlls/msvcp140/tests/msvcp140.c
index 229741a..1bae2b9 100644
--- a/dlls/msvcp140/tests/msvcp140.c
+++ b/dlls/msvcp140/tests/msvcp140.c
@@ -983,7 +983,7 @@ static void test_dir_operation(void)
     result_handle = file;
     result_handle = p_Open_dir(first_file_name, not_existW, &err, &type);
     ok(result_handle == NULL, "_Open_dir(): expect: NULL, got %p\n", result_handle);
-    todo_wine ok(err == ERROR_BAD_PATHNAME, "_Open_dir(): expect: ERROR_BAD_PATHNAME, got %d\n", err);
+    ok(err == ERROR_BAD_PATHNAME, "_Open_dir(): expect: ERROR_BAD_PATHNAME, got %d\n", err);
     ok((int)type == 0xdeadbeef, "_Open_dir(): expect: 0xdeadbeef, got %d\n", type);
     ok(!*first_file_name, "_Open_dir(): expect: 0, got %s\n", wine_dbgstr_w(first_file_name));
 
diff --git a/dlls/msvcp90/ios.c b/dlls/msvcp90/ios.c
index bf7eea2..32bd2e7 100644
--- a/dlls/msvcp90/ios.c
+++ b/dlls/msvcp90/ios.c
@@ -14983,7 +14983,7 @@ void* __cdecl tr2_sys__Open_dir_wchar(wchar_t* target, wchar_t const* dest, int*
 
     handle = FindFirstFileW(temppath, &data);
     if(handle == INVALID_HANDLE_VALUE) {
-        *err_code = GetLastError();
+        *err_code = ERROR_BAD_PATHNAME;
         return NULL;
     }
     while(!wcscmp(data.cFileName, dot) || !wcscmp(data.cFileName, dotdot)) {




More information about the wine-cvs mailing list