From abc565d0ca078f1d6214c447f41de3b5589155c2 Mon Sep 17 00:00:00 2001 From: dshaligram Date: Thu, 11 Jan 2007 07:03:20 +0000 Subject: Changed error message + exit() sequences to end() calls so that the user can see the error message on the console. Added docs/ to the data search path for the Windows builds. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@829 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/files.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'crawl-ref/source/files.cc') diff --git a/crawl-ref/source/files.cc b/crawl-ref/source/files.cc index 78db7bf7d5..1d613e7c7a 100644 --- a/crawl-ref/source/files.cc +++ b/crawl-ref/source/files.cc @@ -366,7 +366,7 @@ std::string datafile_path(const std::string &basename) const std::string prefixes[] = { std::string("dat") + FILE_SEPARATOR, std::string("data") + FILE_SEPARATOR, - std::string("crawl-data") + FILE_SEPARATOR, + std::string("docs") + FILE_SEPARATOR, std::string("..")+FILE_SEPARATOR+std::string("docs")+FILE_SEPARATOR, std::string("..") + FILE_SEPARATOR, std::string(".") + FILE_SEPARATOR, @@ -400,9 +400,8 @@ std::string datafile_path(const std::string &basename) } // Die horribly. - fprintf(stderr, "Cannot find data file '%s' anywhere, aborting\n", - basename.c_str()); - exit(1); + end(1, false, "Cannot find data file '%s' anywhere, aborting\n", + basename.c_str()); return (""); } -- cgit v1.2.3-54-g00ecf