[ros-diffs] [janderwald] 37497: - Convert Value of PATHEXT to lowercase - see bug 3875

janderwald at svn.reactos.org janderwald at svn.reactos.org
Fri Nov 21 09:57:13 CET 2008


Author: janderwald
Date: Fri Nov 21 02:57:13 2008
New Revision: 37497

URL: http://svn.reactos.org/svn/reactos?rev=37497&view=rev
Log:
- Convert Value of PATHEXT to lowercase
- see bug 3875

Modified:
    trunk/reactos/base/shell/cmd/where.c

Modified: trunk/reactos/base/shell/cmd/where.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/where.c?rev=37497&r1=37496&r2=37497&view=diff
==============================================================================
--- trunk/reactos/base/shell/cmd/where.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/where.c [iso-8859-1] Fri Nov 21 02:57:13 2008
@@ -141,7 +141,7 @@
 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,10 +154,15 @@
 	{
 		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 */



More information about the Ros-diffs mailing list