Remove an annoying dialog when trying to clean up a directory.
This commit is contained in:
parent
7647cffbdf
commit
4a9d838ca4
|
@ -827,13 +827,13 @@ static void testNonExistentPath(void)
|
||||||
modifiedPath[len++] = '\0';
|
modifiedPath[len++] = '\0';
|
||||||
if (winetest_interactive)
|
if (winetest_interactive)
|
||||||
printf("Changing CSIDL_FAVORITES to %s\n", modifiedPath);
|
printf("Changing CSIDL_FAVORITES to %s\n", modifiedPath);
|
||||||
if (!RegSetValueExA(key, "Favorites", 0, type, (LPBYTE)modifiedPath, len))
|
if (!RegSetValueExA(key, "Favorites", 0, type,
|
||||||
|
(LPBYTE)modifiedPath, len))
|
||||||
{
|
{
|
||||||
char buffer[MAX_PATH];
|
char buffer[MAX_PATH];
|
||||||
STARTUPINFOA startup;
|
STARTUPINFOA startup;
|
||||||
PROCESS_INFORMATION info;
|
PROCESS_INFORMATION info;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
SHFILEOPSTRUCTA shFileOp;
|
|
||||||
|
|
||||||
wnsprintfA(buffer, sizeof(buffer), "%s tests/shellpath.c 1",
|
wnsprintfA(buffer, sizeof(buffer), "%s tests/shellpath.c 1",
|
||||||
selfname);
|
selfname);
|
||||||
|
@ -869,16 +869,10 @@ static void testNonExistentPath(void)
|
||||||
ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0,
|
ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0,
|
||||||
"child process termination\n");
|
"child process termination\n");
|
||||||
|
|
||||||
/* Remove the directory. In some Windows versions, it
|
strcpy(buffer, modifiedPath);
|
||||||
* contains the system file desktop.ini, so use SHFileOperation
|
strcat(buffer, "\\desktop.ini");
|
||||||
* to remove it and its contents.
|
DeleteFileA(buffer);
|
||||||
*/
|
RemoveDirectoryA(modifiedPath);
|
||||||
shFileOp.hwnd = NULL;
|
|
||||||
shFileOp.wFunc = FO_DELETE;
|
|
||||||
shFileOp.pFrom = modifiedPath;
|
|
||||||
shFileOp.fFlags = FOF_NOCONFIRMATION | FOF_NOERRORUI |
|
|
||||||
FOF_SILENT;
|
|
||||||
SHFileOperationA(&shFileOp);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (winetest_interactive)
|
else if (winetest_interactive)
|
||||||
|
|
Loading…
Reference in New Issue