diff --git a/src/port/path.c b/src/port/path.c
index 708306d..d7bd353 100644
--- a/src/port/path.c
+++ b/src/port/path.c
@@ -427,7 +427,12 @@ dir_strcmp(const char *s1, const char *s2)
 {
 	while (*s1 && *s2)
 	{
+#ifndef WIN32
 		if (*s1 != *s2 &&
+#else
+			/* On windows, paths are case-insensitive */
+		if (tolower(*s1) != tolower(*s2) &&
+#endif
 			!(IS_DIR_SEP(*s1) && IS_DIR_SEP(*s2)))
 			return (int) *s1 - (int) *s2;
 		s1++, s2++;
