mirror of
https://github.com/halpz/re3.git
synced 2025-06-28 18:56:18 +00:00
Fix casepath chaos
This commit is contained in:
@ -255,15 +255,11 @@ CStream::CStream(char *filename, ALuint &source, ALuint (&buffers)[NUM_STREAMBUF
|
||||
{
|
||||
// Be case-insensitive on linux (from https://github.com/OneSadCookie/fcaseopen/)
|
||||
#if !defined(_WIN32)
|
||||
FILE *test = fopen(filename, "r");
|
||||
if (!test) {
|
||||
char *r = (char*)alloca(strlen(filename) + 2);
|
||||
if (casepath(filename, r))
|
||||
{
|
||||
strcpy(m_aFilename, r);
|
||||
}
|
||||
char *real = casepath(filename);
|
||||
if (real) {
|
||||
strcpy(m_aFilename, real);
|
||||
free(real);
|
||||
} else {
|
||||
fclose(test);
|
||||
#else
|
||||
{
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user