Commit f28155de authored by Dimitrie O. Paun's avatar Dimitrie O. Paun Committed by Alexandre Julliard

In Win9x, {Create,Remove}Directory returns ERROR_PATH_NOT_FOUND when

given directories containing '*' or '?'.
parent b395a0c5
...@@ -195,14 +195,16 @@ static void test_CreateDirectoryA(void) ...@@ -195,14 +195,16 @@ static void test_CreateDirectoryA(void)
lstrcatA(tmpdir, "?"); lstrcatA(tmpdir, "?");
ret = CreateDirectoryA(tmpdir, NULL); ret = CreateDirectoryA(tmpdir, NULL);
ok(ret == FALSE && GetLastError() == ERROR_INVALID_NAME, ok(ret == FALSE && (GetLastError() == ERROR_INVALID_NAME ||
GetLastError() == ERROR_PATH_NOT_FOUND),
"CreateDirectoryA with ? wildcard name should fail, ret=%s error=%ld\n", "CreateDirectoryA with ? wildcard name should fail, ret=%s error=%ld\n",
ret ? " True" : "False", GetLastError()); ret ? " True" : "False", GetLastError());
ret = RemoveDirectoryA(tmpdir); ret = RemoveDirectoryA(tmpdir);
tmpdir[lstrlenA(tmpdir) - 1] = '*'; tmpdir[lstrlenA(tmpdir) - 1] = '*';
ret = CreateDirectoryA(tmpdir, NULL); ret = CreateDirectoryA(tmpdir, NULL);
ok(ret == FALSE && GetLastError() == ERROR_INVALID_NAME, ok(ret == FALSE && (GetLastError() == ERROR_INVALID_NAME ||
GetLastError() == ERROR_PATH_NOT_FOUND),
"CreateDirectoryA with * wildcard name should fail, ret=%s error=%ld\n", "CreateDirectoryA with * wildcard name should fail, ret=%s error=%ld\n",
ret ? " True" : "False", GetLastError()); ret ? " True" : "False", GetLastError());
ret = RemoveDirectoryA(tmpdir); ret = RemoveDirectoryA(tmpdir);
...@@ -284,14 +286,16 @@ static void test_RemoveDirectoryA(void) ...@@ -284,14 +286,16 @@ static void test_RemoveDirectoryA(void)
lstrcatA(tmpdir, "?"); lstrcatA(tmpdir, "?");
ret = RemoveDirectoryA(tmpdir); ret = RemoveDirectoryA(tmpdir);
ok(ret == FALSE && GetLastError() == ERROR_INVALID_NAME, ok(ret == FALSE && (GetLastError() == ERROR_INVALID_NAME ||
"RemoveDirectoryA with ? wildcard name should fail with error 183, ret=%s error=%ld\n", GetLastError() == ERROR_PATH_NOT_FOUND),
"RemoveDirectoryA with ? wildcard name should fail, ret=%s error=%ld\n",
ret ? " True" : "False", GetLastError()); ret ? " True" : "False", GetLastError());
tmpdir[lstrlenA(tmpdir) - 1] = '*'; tmpdir[lstrlenA(tmpdir) - 1] = '*';
ret = RemoveDirectoryA(tmpdir); ret = RemoveDirectoryA(tmpdir);
ok(ret == FALSE && GetLastError() == ERROR_INVALID_NAME, ok(ret == FALSE && (GetLastError() == ERROR_INVALID_NAME ||
"RemoveDirectoryA with * wildcard name should fail with error 183, ret=%s error=%ld\n", GetLastError() == ERROR_PATH_NOT_FOUND),
"RemoveDirectoryA with * wildcard name should fail, ret=%s error=%ld\n",
ret ? " True" : "False", GetLastError()); ret ? " True" : "False", GetLastError());
} }
......
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