Fixed the determining of the file from the output redirection.

svn path=/trunk/; revision=16602
This commit is contained in:
Hartmut Birr 2005-07-17 07:02:20 +00:00
parent 14733418a7
commit b4d21f4107

View file

@ -131,7 +131,7 @@ INT GetRedirection (LPTSTR s, LPTSTR ifn, LPTSTR ofn, LPTSTR efn, LPINT lpnFlags
else if (*sp == _T('1'))
{
/* error redirection */
/* output redirection */
sp++;
if (*sp == _T('>'))
@ -146,14 +146,6 @@ INT GetRedirection (LPTSTR s, LPTSTR ifn, LPTSTR ofn, LPTSTR efn, LPINT lpnFlags
*lpnFlags |= OUTPUT_APPEND;
sp++;
}
while (_istspace (*sp))
sp++;
/* copy file name */
while (*sp && !IsRedirection (*sp) && !_istspace (*sp))
*ofn++ = *sp++;
*ofn = _T('\0');
}
else
{
@ -168,8 +160,8 @@ INT GetRedirection (LPTSTR s, LPTSTR ifn, LPTSTR ofn, LPTSTR efn, LPINT lpnFlags
/* copy file name */
while (*sp && !IsRedirection (*sp) && !_istspace (*sp))
*efn++ = *sp++;
*efn = _T('\0');
*ofn++ = *sp++;
*ofn = _T('\0');
}
else if (*sp == _T('2'))