mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
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
This commit is contained in:
parent
68c701fb4a
commit
000cfffe32
1 changed files with 5 additions and 1 deletions
|
@ -359,6 +359,7 @@ int32_t findfrompath(const char *fn, char **where)
|
||||||
*where = Bstrdup(fn);
|
*where = Bstrdup(fn);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#ifndef _WIN32
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
char *tfn = Bstrtolower(Bstrdup(fn));
|
char *tfn = Bstrtolower(Bstrdup(fn));
|
||||||
|
@ -379,6 +380,7 @@ int32_t findfrompath(const char *fn, char **where)
|
||||||
|
|
||||||
Bfree(tfn);
|
Bfree(tfn);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
for (pfn = (char *)fn; toupperlookup[*pfn] == '/'; pfn++);
|
for (pfn = (char *)fn; toupperlookup[*pfn] == '/'; pfn++);
|
||||||
|
@ -417,6 +419,7 @@ int32_t findfrompath(const char *fn, char **where)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef _WIN32
|
||||||
//Check with all lowercase
|
//Check with all lowercase
|
||||||
strcpy(pfn, sp->path);
|
strcpy(pfn, sp->path);
|
||||||
Bstrtolower(tfn);
|
Bstrtolower(tfn);
|
||||||
|
@ -440,9 +443,10 @@ int32_t findfrompath(const char *fn, char **where)
|
||||||
Bfree(tfn);
|
Bfree(tfn);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
Bfree(tfn);
|
Bfree(tfn);
|
||||||
}
|
}
|
||||||
|
|
||||||
Bfree(pfn); Bfree(ffn);
|
Bfree(pfn); Bfree(ffn);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue