mirror of
https://github.com/reactos/wine.git
synced 2024-11-23 11:49:50 +00:00
xcopy/tests: Fix the test in case stdin has been redirected.
This commit is contained in:
parent
e5a26f6fdf
commit
8d51235dbe
@ -31,7 +31,11 @@ static DWORD runcmd(const char* cmd)
|
||||
/* Create a writable copy for CreateProcessA() */
|
||||
wcmd = HeapAlloc(GetProcessHeap(), 0, strlen(cmd) + 1);
|
||||
strcpy(wcmd, cmd);
|
||||
rc = CreateProcessA(NULL, wcmd, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
|
||||
|
||||
/* On Windows 2003 and older, xcopy.exe fails if stdin is not a console
|
||||
* handle, even with '/I /Y' options.
|
||||
*/
|
||||
rc = CreateProcessA(NULL, wcmd, NULL, NULL, FALSE, CREATE_NEW_CONSOLE, NULL, NULL, &si, &pi);
|
||||
HeapFree(GetProcessHeap(), 0, wcmd);
|
||||
if (!rc)
|
||||
return 260;
|
||||
|
Loading…
Reference in New Issue
Block a user