Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit aa38153

Browse files
committed
Make directory name comparisons on Win32 case insensitive.
This method will not catch all different ways since the locale handling in NTFS doesn't provide an easy way to do that, but it will hopefully solve the most common cases causing startup problems when the backend is found in the system PATH. Attempts to fix bug #4694.
1 parent d0b5990 commit aa38153

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/port/path.c

+6-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/port/path.c,v 1.76 2009/01/01 17:24:04 momjian Exp $
11+
* $PostgreSQL: pgsql/src/port/path.c,v 1.77 2009/04/03 11:52:08 mha Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -427,7 +427,12 @@ dir_strcmp(const char *s1, const char *s2)
427427
{
428428
while (*s1 && *s2)
429429
{
430+
#ifndef WIN32
430431
if (*s1 != *s2 &&
432+
#else
433+
/* On windows, paths are case-insensitive */
434+
if (pg_tolower(*s1) != pg_tolower(*s2) &&
435+
#endif
431436
!(IS_DIR_SEP(*s1) && IS_DIR_SEP(*s2)))
432437
return (int) *s1 - (int) *s2;
433438
s1++, s2++;

0 commit comments

Comments
 (0)