wcmd: Fix redirecting a pipe to another pipe.

This commit is contained in:
Erich Hoover 2009-01-11 13:08:50 -07:00 committed by Alexandre Julliard
parent 423929ad10
commit 8defde719a
1 changed files with 7 additions and 0 deletions

View File

@ -1871,6 +1871,13 @@ WCHAR *WCMD_ReadAndParseLine(WCHAR *optionalcmd, CMD_LIST **output, HANDLE readF
}
curCopyTo[(*curLen)++] = *curPos;
/* If a redirect is immediately followed by '&' (ie. 2>&1) then
do not process that ampersand as an AND operator */
if (thisChar == '>' && *(curPos+1) == '&') {
curCopyTo[(*curLen)++] = *(curPos+1);
curPos++;
}
break;
case '|': /* Pipe character only if not || */