mirror of
https://github.com/reactos/reactos.git
synced 2024-10-05 00:43:21 +00:00
- Convert Value of PATHEXT to lowercase
- see bug 3875 svn path=/trunk/; revision=37497
This commit is contained in:
parent
a16c4ab474
commit
b828f5779e
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue