From 0b3949389e9f7a48023894174d5e8e19286c199a Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 14 Nov 2004 21:10:50 +0000 Subject: Extend fopenNoCase with probe of capitalized files, such as Cave.mid. svn-id: r15812 --- common/file.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'common/file.cpp') diff --git a/common/file.cpp b/common/file.cpp index cbc2ca6e00..d943c3af2a 100644 --- a/common/file.cpp +++ b/common/file.cpp @@ -83,6 +83,15 @@ FILE *File::fopenNoCase(const char *filename, const char *directory, const char file = fopen(buf, mode); } + // + // Try again, with file name capitalized + // + if (!file) { + ptr = buf + offsetToFileName; + *ptr = toupper(*ptr); + file = fopen(buf, mode); + } + return file; } -- cgit v1.2.3