diff --git a/src/App/Application.cpp b/src/App/Application.cpp index 7c5a0fa37..351db5ea9 100644 --- a/src/App/Application.cpp +++ b/src/App/Application.cpp @@ -1900,7 +1900,6 @@ void Application::ParseOptions(int ac, char ** av) void Application::ExtractUserPath() { // std paths - char *FCUserData; mConfig["BinPath"] = mConfig["AppHomePath"] + "bin" + PATHSEP; mConfig["DocPath"] = mConfig["AppHomePath"] + "doc" + PATHSEP; @@ -1910,11 +1909,14 @@ void Application::ExtractUserPath() if (pwd == NULL) throw Base::Exception("Getting HOME path from system failed!"); mConfig["UserHomePath"] = pwd->pw_dir; + char *path="/tmp"; - if ( FCUserData=getenv("FREECAD_USER_DATA") ) - path=FCUserData; + char *FCUserData; + if (FCUserData=getenv("FREECAD_USER_DATA")) + path = FCUserData; else - path= pwd->pw_dir; + path = pwd->pw_dir; + std::string appData(path); Base::FileInfo fi(appData.c_str()); if (!fi.exists()) {