Signed-off-by: Gijs Vermeulen gijsvrm@gmail.com ---
FindFirstFileW sets last error to ERROR_PATH_NOT_FOUND in this case. Tests seem to prove that this is correct, but _Open_dir sets err to ERROR_BAD_PATHNAME.
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 ac38aa61a0..6d72f9fd68 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 229741a52d..1bae2b914d 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 bf7eea2e6f..32bd2e7ccd 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)) {