mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
Fixed the determining of the file from the output redirection.
svn path=/trunk/; revision=16602
This commit is contained in:
parent
14733418a7
commit
b4d21f4107
1 changed files with 12 additions and 20 deletions
|
@ -129,31 +129,23 @@ INT GetRedirection (LPTSTR s, LPTSTR ifn, LPTSTR ofn, LPTSTR efn, LPINT lpnFlags
|
||||||
*ofn = _T('\0');
|
*ofn = _T('\0');
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (*sp == _T('1'))
|
else if (*sp == _T('1'))
|
||||||
{
|
{
|
||||||
/* error redirection */
|
/* output redirection */
|
||||||
sp++;
|
sp++;
|
||||||
|
|
||||||
if (*sp == _T('>'))
|
if (*sp == _T('>'))
|
||||||
{
|
{
|
||||||
/* output redirection */
|
/* output redirection */
|
||||||
*lpnFlags |= OUTPUT_REDIRECTION;
|
*lpnFlags |= OUTPUT_REDIRECTION;
|
||||||
sp++;
|
sp++;
|
||||||
|
|
||||||
/* append request ? */
|
/* append request ? */
|
||||||
if (*sp == _T('>'))
|
if (*sp == _T('>'))
|
||||||
{
|
{
|
||||||
*lpnFlags |= OUTPUT_APPEND;
|
*lpnFlags |= OUTPUT_APPEND;
|
||||||
sp++;
|
sp++;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (_istspace (*sp))
|
|
||||||
sp++;
|
|
||||||
|
|
||||||
/* copy file name */
|
|
||||||
while (*sp && !IsRedirection (*sp) && !_istspace (*sp))
|
|
||||||
*ofn++ = *sp++;
|
|
||||||
*ofn = _T('\0');
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -168,8 +160,8 @@ INT GetRedirection (LPTSTR s, LPTSTR ifn, LPTSTR ofn, LPTSTR efn, LPINT lpnFlags
|
||||||
|
|
||||||
/* copy file name */
|
/* copy file name */
|
||||||
while (*sp && !IsRedirection (*sp) && !_istspace (*sp))
|
while (*sp && !IsRedirection (*sp) && !_istspace (*sp))
|
||||||
*efn++ = *sp++;
|
*ofn++ = *sp++;
|
||||||
*efn = _T('\0');
|
*ofn = _T('\0');
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (*sp == _T('2'))
|
else if (*sp == _T('2'))
|
||||||
|
|
Loading…
Reference in a new issue