Fixed the determining of the file from the output redirection.
Modified: trunk/reactos/subsys/system/cmd/redir.c

Modified: trunk/reactos/subsys/system/cmd/redir.c
--- trunk/reactos/subsys/system/cmd/redir.c	2005-07-17 00:44:33 UTC (rev 16601)
+++ trunk/reactos/subsys/system/cmd/redir.c	2005-07-17 07:02:20 UTC (rev 16602)
@@ -129,32 +129,24 @@
 				*ofn = _T('\0');
 			}
 
-      else if (*sp == _T('1'))
+                        else if (*sp == _T('1'))
 			{
-				/* error redirection */
+				/* output redirection */
 				sp++;
 
 				if (*sp == _T('>'))
 				{
 					/* output redirection */
-				*lpnFlags |= OUTPUT_REDIRECTION;
-				sp++;
+				        *lpnFlags |= OUTPUT_REDIRECTION;
+				        sp++;
 
-				/* append request ? */
-				if (*sp == _T('>'))
-				{
-					*lpnFlags |= OUTPUT_APPEND;
-					sp++;
+				        /* append request ? */
+				        if (*sp == _T('>'))
+				        {
+					        *lpnFlags |= OUTPUT_APPEND;
+					        sp++;
+				        }
 				}
-
-				while (_istspace (*sp))
-					sp++;
-
-				/* copy file name */
-				while (*sp && !IsRedirection (*sp) && !_istspace (*sp))
-					*ofn++ = *sp++;
-				*ofn = _T('\0');
-				}
 				else
 				{
 					/* no redirection!! copy the '1' character! */
@@ -168,8 +160,8 @@
 
 				/* copy file name */
 				while (*sp && !IsRedirection (*sp) && !_istspace (*sp))
-					*efn++ = *sp++;
-				*efn = _T('\0');
+					*ofn++ = *sp++;
+				*ofn = _T('\0');
 			}
 
 			else if (*sp == _T('2'))