From 92f5c6b1da1b369e4518fc1f59b30feb9c771c30 Mon Sep 17 00:00:00 2001 From: glx Date: Fri, 23 Jan 2009 01:29:13 +0000 Subject: (svn r15214) -Fix [NoAI]: ignore case for ai/library main script path on windows --- src/ai/ai_scanner.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/ai') diff --git a/src/ai/ai_scanner.cpp b/src/ai/ai_scanner.cpp index be0dfa59d..0d4feb34d 100644 --- a/src/ai/ai_scanner.cpp +++ b/src/ai/ai_scanner.cpp @@ -89,6 +89,11 @@ void AIScanner::ScanDir(const char *dirname, bool library_scan, bool library_rec ttd_strlcat(main_script, "main.nut", sizeof(main_script)); if (!FioCheckFileExists(info_script, AI_DIR) || !FioCheckFileExists(main_script, AI_DIR)) continue; +#ifdef WIN32 + /* Windows doesn't care about the case */ + strtolower(main_script); +#endif + DEBUG(ai, 6, "Loading AI at location '%s'", main_script); this->engine->LoadScript(info_script); } else { @@ -101,6 +106,11 @@ void AIScanner::ScanDir(const char *dirname, bool library_scan, bool library_rec ttd_strlcat(main_script, "main.nut", sizeof(main_script)); if (!FioCheckFileExists(library_script, AI_LIBRARY_DIR) || !FioCheckFileExists(main_script, AI_LIBRARY_DIR)) continue; +#ifdef WIN32 + /* Windows doesn't care about the case */ + strtolower(main_script); +#endif + DEBUG(ai, 6, "Loading AI Library at location '%s'", main_script); this->engine->LoadScript(library_script); } -- cgit v1.2.3-70-g09d2