Commit 8d51235d authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

xcopy/tests: Fix the test in case stdin has been redirected.

parent e5a26f6f
...@@ -31,7 +31,11 @@ static DWORD runcmd(const char* cmd) ...@@ -31,7 +31,11 @@ static DWORD runcmd(const char* cmd)
/* Create a writable copy for CreateProcessA() */ /* Create a writable copy for CreateProcessA() */
wcmd = HeapAlloc(GetProcessHeap(), 0, strlen(cmd) + 1); wcmd = HeapAlloc(GetProcessHeap(), 0, strlen(cmd) + 1);
strcpy(wcmd, cmd); 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); HeapFree(GetProcessHeap(), 0, wcmd);
if (!rc) if (!rc)
return 260; return 260;
......
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