diff --git a/apps/openmw/path.hpp b/apps/openmw/path.hpp index 8e8dac09e..914882194 100644 --- a/apps/openmw/path.hpp +++ b/apps/openmw/path.hpp @@ -42,9 +42,16 @@ namespace OMW theBasePath = macBundlePath() + "/Contents/MacOS/"; //FIXME do we have global/local with OSX? #elif OGRE_PLATFORM_LINUX const char* homedir; - if ((homedir = getenv("HOME")) == NULL) - return NULL; - theBasePath = std::string(homedir)+"/."+parApp+"/"; + if ((homedir = getenv("OPENMW_HOME")) != NULL) + { + theBasePath = std::string(homedir)+"/"; + } + else + { + if ((homedir = getenv("HOME")) == NULL) + return NULL; + theBasePath = std::string(homedir)+"/."+parApp+"/"; + } mkdir(theBasePath.c_str(), 0777); #else theBasePath = "";