From 1210d4439b7da2cea42e15892f7a09a03c6f0814 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Thu, 17 Jul 2008 07:37:27 +0000 Subject: Apply DOS fixes to trunk. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6580 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/initfile.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/initfile.cc') diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc index da0afef3d9..14f7e5536a 100644 --- a/crawl-ref/source/initfile.cc +++ b/crawl-ref/source/initfile.cc @@ -2911,6 +2911,9 @@ std::string game_options::resolve_include( // favoured file separator. parent_file = canonicalise_file_separator(parent_file); included_file = canonicalise_file_separator(included_file); +#if defined(DOS) + get_dos_compatible_file_name(&included_file); +#endif // How we resolve include paths: // 1. If it's an absolute path, use it directly. @@ -2951,9 +2954,8 @@ std::string game_options::resolve_include( return datafile_path(included_file, false, true); } -std::string game_options::resolve_include( - const std::string &file, - const char *type) +std::string game_options::resolve_include( const std::string &file, + const char *type) { try { @@ -2961,9 +2963,11 @@ std::string game_options::resolve_include( resolve_include(this->filename, file, &SysEnv.rcdirs); if (resolved.empty()) + { report_error( make_stringf("Cannot find %sfile \"%s\".", type, file.c_str())); + } return (resolved); } catch (const std::string &err) -- cgit v1.2.3-54-g00ecf