Set errorlevel to 0 when user enters 'no' on del confirmation. this is
how MS does it.
Modified: trunk/reactos/subsys/system/cmd/del.c
_____
Modified: trunk/reactos/subsys/system/cmd/del.c
--- trunk/reactos/subsys/system/cmd/del.c 2005-09-16 08:48:00 UTC
(rev 17877)
+++ trunk/reactos/subsys/system/cmd/del.c 2005-09-16 13:58:37 UTC
(rev 17878)
@@ -264,7 +264,8 @@
if ((res == PROMPT_NO) || (res ==
PROMPT_BREAK))
{
- continue; //FIXME: Errorcode?
+
nErrorLevel = 0;
+ continue;
}
}
When searching for a file to execute, if you fail to find it using the
first part of the input, try to use the full line input. problem is
really only seen when doing "start foo.bat".
Modified: trunk/reactos/subsys/system/cmd/cmd.c
_____
Modified: trunk/reactos/subsys/system/cmd/cmd.c
--- trunk/reactos/subsys/system/cmd/cmd.c 2005-09-16 05:35:43 UTC
(rev 17875)
+++ trunk/reactos/subsys/system/cmd/cmd.c 2005-09-16 05:51:20 UTC
(rev 17876)
@@ -420,13 +420,16 @@
/* search the PATH environment variable for the binary */
if (!SearchForExecutable (first, szFullName))
{
- error_bad_command ();
+ if (!SearchForExecutable (full, szFullName))
+ {
+ error_bad_command ();
+ free (first);
+ free (rest);
+ free (full);
+ free (szFullName);
+ return;
+ }
- free (first);
- free (rest);
- free (full);
- free (szFullName);
- return;
}
GetConsoleTitle (szWindowTitle, MAX_PATH);
@@ -539,7 +542,6 @@
INT cl;
LPCOMMAND cmdptr;
-
#ifdef _DEBUG
DebugPrintf (_T("DoCommand: (\'%s\')\n"), line);
#endif /* DEBUG */