From 000cfffe3200c7e137eeab7ca9f31512ff046115 Mon Sep 17 00:00:00 2001 From: helixhorned Date: Fri, 25 May 2012 15:23:58 +0000 Subject: [PATCH] On Windows, don't try to lowercase/uppercase filenames. Most of the time, Windows file name lookup is case-insensitive. Reading the docs (see MSDN's CreateFile help, for example), it seems like case-sensitivity can be controlled on a per-file basis where applicable (NTFS), but people should be concerned about matching case in the DEFs/on disk *especially* in that case. Also, note that this hack will not always help on systems with case-sensitive lookup. git-svn-id: https://svn.eduke32.com/eduke32@2693 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/src/cache1d.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/polymer/eduke32/build/src/cache1d.c b/polymer/eduke32/build/src/cache1d.c index 273ab60a3..2a70bd18d 100644 --- a/polymer/eduke32/build/src/cache1d.c +++ b/polymer/eduke32/build/src/cache1d.c @@ -359,6 +359,7 @@ int32_t findfrompath(const char *fn, char **where) *where = Bstrdup(fn); return 0; } +#ifndef _WIN32 else { char *tfn = Bstrtolower(Bstrdup(fn)); @@ -379,6 +380,7 @@ int32_t findfrompath(const char *fn, char **where) Bfree(tfn); } +#endif } for (pfn = (char *)fn; toupperlookup[*pfn] == '/'; pfn++); @@ -417,6 +419,7 @@ int32_t findfrompath(const char *fn, char **where) return 0; } +#ifndef _WIN32 //Check with all lowercase strcpy(pfn, sp->path); Bstrtolower(tfn); @@ -440,9 +443,10 @@ int32_t findfrompath(const char *fn, char **where) Bfree(tfn); return 0; } - +#endif Bfree(tfn); } + Bfree(pfn); Bfree(ffn); return -1; }