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".

svn path=/trunk/; revision=17876
This commit is contained in:
Brandon Turner 2005-09-16 05:51:20 +00:00
parent 3d2d6eff0b
commit ea5a3afa86

View file

@ -420,13 +420,16 @@ Execute (LPTSTR Full, LPTSTR First, LPTSTR Rest)
/* 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 @@ DoCommand (LPTSTR line)
INT cl;
LPCOMMAND cmdptr;
#ifdef _DEBUG
DebugPrintf (_T("DoCommand: (\'%s\')\n"), line);
#endif /* DEBUG */