Removed some unused code, added better error message in case
stk_config.xml could not be found.
This commit is contained in:
parent
9557ad9be9
commit
431853b451
@ -181,14 +181,22 @@ FileManager::FileManager()
|
||||
{
|
||||
#ifdef SUPERTUXKART_DATADIR
|
||||
root_dir = SUPERTUXKART_DATADIR"/data/";
|
||||
if(root_dir.size()==0 || root_dir[root_dir.size()-1]!='/')
|
||||
root_dir+='/';
|
||||
|
||||
#else
|
||||
root_dir = "/usr/local/share/games/supertuxkart/";
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!m_file_system->existFile((root_dir + "stk_config.xml").c_str()))
|
||||
{
|
||||
Log::error("FileManager", "Could not file stk_config.xml in any "
|
||||
"standard location (esp. ../data).");
|
||||
Log::error("FileManager",
|
||||
"Last location checked '%s'.", root_dir.c_str());
|
||||
Log::fatal("FileManager",
|
||||
"Set $SUPERTUXKART_DATADIR to point to the data directory.");
|
||||
// fatal will exit the application
|
||||
}
|
||||
|
||||
addRootDirs(root_dir);
|
||||
if( fileExists(root_dir+"../../stk-assets"))
|
||||
addRootDirs(root_dir+"../../stk-assets");
|
||||
|
Loading…
x
Reference in New Issue
Block a user