"Martin Fuchs" martin-fuchs@gmx.net wrote:
Changelog: make drive letters in PIDLs always uppercase to enable PIDL comparison
Index: shfldr_mycomp.c
RCS file: /CVS/ReactOS/reactos/lib/shell32/shfldr_mycomp.c,v retrieving revision 1.10 diff -u -p -d -r1.10 shfldr_mycomp.c --- shfldr_mycomp.c 11 Apr 2004 13:24:29 -0000 1.10 +++ shfldr_mycomp.c 13 Apr 2004 20:45:39 -0000 @@ -217,6 +217,7 @@ ISF_MyComputer_fnParseDisplayName (IShel /* do we have an absolute path name ? */ else if (PathGetDriveNumberW (lpszDisplayName) >= 0 && lpszDisplayName[2] == (WCHAR) '\') { szNext = GetNextElementW (lpszDisplayName, szElement, MAX_PATH);
szElement[0] = toupper(szElement[0]); /* make drive letter uppercase to enable PIDL comparison */
It's better to use unicode version here (toupperW) since in some linux locales uppercasing is done differently.
13 Apr 2004 20:45:39 -0000
@@ -217,6 +217,7 @@ ISF_MyComputer_fnParseDisplayName (IShel /* do we have an absolute path name ? */ else if (PathGetDriveNumberW (lpszDisplayName) >= 0 &&
lpszDisplayName[2] == (WCHAR) '\') {
szNext = GetNextElementW (lpszDisplayName, szElement, MAX_PATH);
szElement[0] = toupper(szElement[0]); /* make drive letter
uppercase to enable PIDL comparison */
It's better to use unicode version here (toupperW) since in some linux locales uppercasing is done differently.
Even for drive letters? The only valid characters you will find in szElement[0] are a..z and A..Z.
Regards,
Martin
"Martin Fuchs" martin-fuchs@gmx.net writes:
Even for drive letters? The only valid characters you will find in szElement[0] are a..z and A..Z.
Not all Unix locales map a..z to A..Z, so yes we have to use toupperW. But a better fix is probably to make _ILCreateDrive take a Unicode string and do the conversion in there.