From da8f23724af3bc3c98a62f75fe91424412501f43 Mon Sep 17 00:00:00 2001 From: dooglus Date: Sun, 9 Nov 2008 19:09:45 +0000 Subject: [PATCH] Fix 2250533: "synfig_modules.cfg in ~/.synfig never loaded". Use the HOME environment variable if it's available. git-svn-id: https://synfig.svn.sourceforge.net/svnroot/synfig@2177 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-core/trunk/src/synfig/main.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/synfig-core/trunk/src/synfig/main.cpp b/synfig-core/trunk/src/synfig/main.cpp index c97d0ed..a1b0ca3 100644 --- a/synfig-core/trunk/src/synfig/main.cpp +++ b/synfig-core/trunk/src/synfig/main.cpp @@ -232,7 +232,8 @@ synfig::Main::Main(const synfig::String& basepath,ProgressCallback *cb): { locations.push_back("./"MODULE_LIST_FILENAME); locations.push_back("../etc/"MODULE_LIST_FILENAME); - locations.push_back("~/.synfig/"MODULE_LIST_FILENAME); + if(getenv("HOME")) + locations.push_back(strprintf("%s/.synfig/%s", getenv("HOME"), MODULE_LIST_FILENAME)); #ifdef SYSCONFDIR locations.push_back(SYSCONFDIR"/"MODULE_LIST_FILENAME); #endif @@ -241,7 +242,8 @@ synfig::Main::Main(const synfig::String& basepath,ProgressCallback *cb): #ifdef __APPLE__ locations.push_back("/Library/Frameworks/synfig.framework/Resources/"MODULE_LIST_FILENAME); locations.push_back("/Library/Synfig/"MODULE_LIST_FILENAME); - locations.push_back("~/Library/Synfig/"MODULE_LIST_FILENAME); + if(getenv("HOME")) + locations.push_back(strprintf("%s/Library/Synfig/%s", getenv("HOME"), MODULE_LIST_FILENAME)); #endif #ifdef WIN32 locations.push_back("C:\\Program Files\\Synfig\\etc\\"MODULE_LIST_FILENAME); -- 2.7.4