From 658d49407c460d98fff89a14a6c40b5153cdf640 Mon Sep 17 00:00:00 2001 From: Raphael Ackermann Date: Mon, 25 Feb 2008 22:02:01 +0000 Subject: [PATCH] =?UTF-8?q?2008-02-25=20=20=C5=81ukasz=20Rymarczyk=20=20=09*=20src/const.py.in:=20quer?= =?UTF-8?q?y=20os.environ=20for=20GRAMPSHOME=20env=20and=20use=20it=20=090?= =?UTF-8?q?001831:=20A=20patch=20allowing=20using=20a=20different=20home?= =?UTF-8?q?=20folder=20than=20default?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit svn: r10120 --- ChangeLog | 6 +++++- src/const.py.in | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 748a903c3..83eec6297 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,8 @@ -2008-02-20 Frederik De Richter +2008-02-25 Ɓukasz Rymarczyk + * src/const.py.in: query os.environ for GRAMPSHOME env and use it + 0001831: A patch allowing using a different home folder than default + +2008-02-25 Frederik De Richter * src/GrampsLogger/_ErrorView.py links to wiki manual diff --git a/src/const.py.in b/src/const.py.in index 8c8ea7e2f..4063cb351 100644 --- a/src/const.py.in +++ b/src/const.py.in @@ -74,7 +74,10 @@ SYSCONFDIR = "@sysconfdir@" # Windows apparently uses USERPROFILE # #------------------------------------------------------------------------- -if os.environ.has_key('USERPROFILE'): +if os.environ.has_key('GRAMPSHOME'): + USER_HOME = os.environ['GRAMPSHOME'] + HOME_DIR = os.path.join(USER_HOME, 'gramps') +elif os.environ.has_key('USERPROFILE'): USER_HOME = os.environ['USERPROFILE'] if os.environ.has_key('APPDATA'): HOME_DIR = os.path.join(os.environ['APPDATA'], 'gramps')