Better error checking

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5614 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2010-07-01 18:06:18 +00:00
parent 3b1757449b
commit 58d8e91e20

View File

@ -488,14 +488,16 @@ void FileManager::checkAndCreateAddonsDir()
if(!checkAndCreateDirectory(m_addons_dir))
{
fprintf(stderr, "Can not create config dir '%s', falling back to '.'.\n",
m_addons_dir.c_str());
fprintf(stderr, "Can not create add-ons dir '%s', falling back to '.'.\n", m_addons_dir.c_str());
m_config_dir = ".";
}
else
{
//we hope that there will be no problem since we created the other dir
checkAndCreateDirectory(m_addons_dir + "/data/");
if (!checkAndCreateDirectory(m_addons_dir + "/data/"))
{
fprintf(stderr, "Failed to create add-ons data dir at '%s'\n", (m_addons_dir + "/data/").c_str());
}
}
return;
} // checkAndCreateAddonsDir