- Convert Value of PATHEXT to lowercase

- see bug 3875

svn path=/trunk/; revision=37497
This commit is contained in:
Johannes Anderwald 2008-11-21 08:57:13 +00:00
parent a16c4ab474
commit b828f5779e

View file

@ -141,7 +141,7 @@ SearchForExecutableSingle (LPCTSTR pFileName, LPTSTR pFullName, LPTSTR pPathExt,
BOOL
SearchForExecutable (LPCTSTR pFileName, LPTSTR pFullName)
{
static TCHAR pszDefaultPathExt[] = _T(".COM;.EXE;.BAT;.CMD");
static TCHAR pszDefaultPathExt[] = _T(".com;.exe;.bat;.cmd");
LPTSTR pszPathExt, pszPath;
LPTSTR pCh;
DWORD dwBuffer;
@ -154,11 +154,16 @@ SearchForExecutable (LPCTSTR pFileName, LPTSTR pFullName)
{
pszPathExt = (LPTSTR)cmd_realloc (pszPathExt, dwBuffer * sizeof (TCHAR));
GetEnvironmentVariable (_T("PATHEXT"), pszPathExt, dwBuffer);
_tcslwr(pszPathExt);
}
else if (0 == dwBuffer)
{
_tcscpy(pszPathExt, pszDefaultPathExt);
}
else
{
_tcslwr(pszPathExt);
}
/* Check if valid directly on specified path */
if (SearchForExecutableSingle(pFileName, pFullName, pszPathExt, NULL))