Commit 64aba27f authored by Gijs Vermeulen's avatar Gijs Vermeulen Committed by Alexandre Julliard

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

parent 39876236
......@@ -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);
......
......@@ -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));
......
......@@ -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)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment