fix crashing if /home/greye/.cache not exist

This commit is contained in:
greye 2012-10-25 15:14:34 +04:00
parent 4ca0eb93ee
commit 9f923e7963

View file

@ -67,7 +67,7 @@ RenderingManager::RenderingManager (OEngine::Render::OgreRenderer& _rend, const
// material system
sh::OgrePlatform* platform = new sh::OgrePlatform("General", (resDir / "materials").string());
if (!boost::filesystem::exists (cacheDir))
boost::filesystem::create_directory (cacheDir);
boost::filesystem::create_directories (cacheDir);
platform->setCacheFolder (cacheDir.string());
mFactory = new sh::Factory(platform);