From 26df852f070988ec183b22f96936793f9e5e4b91 Mon Sep 17 00:00:00 2001 From: wmayer Date: Thu, 16 Jun 2016 15:00:30 +0200 Subject: [PATCH] improve whitespaces --- src/App/Application.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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()) {