Fix a test failing on Windows. Reported by Katerina Nizhnik.

This commit is contained in:
Juan Lang 2005-09-03 09:37:15 +00:00 committed by Alexandre Julliard
parent 160b9149a1
commit 9cbe48f80c

View File

@ -833,7 +833,7 @@ static void testNonExistentPath(void)
STARTUPINFOA startup;
PROCESS_INFORMATION info;
HRESULT hr;
BOOL ret;
SHFILEOPSTRUCTA shFileOp;
wnsprintfA(buffer, sizeof(buffer), "%s tests/shellpath.c 1",
selfname);
@ -869,8 +869,16 @@ static void testNonExistentPath(void)
ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0,
"child process termination\n");
ret = RemoveDirectoryA(modifiedPath);
ok( ret, "RemoveDirectoryA failed: %ld\n", GetLastError());
/* Remove the directory. In some Windows versions, it
* contains the system file desktop.ini, so use SHFileOperation
* to remove it and its contents.
*/
shFileOp.hwnd = NULL;
shFileOp.wFunc = FO_DELETE;
shFileOp.pFrom = modifiedPath;
shFileOp.fFlags = FOF_NOCONFIRMATION | FOF_NOERRORUI |
FOF_SILENT;
SHFileOperationA(&shFileOp);
}
}
else if (winetest_interactive)