[GRASS-SVN] r49460 - grass/trunk/lib/init
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Dec 1 07:36:36 EST 2011
Author: martinl
Date: 2011-12-01 04:36:36 -0800 (Thu, 01 Dec 2011)
New Revision: 49460
Modified:
grass/trunk/lib/init/grass.py
Log:
grass.py: reuse grass_config_dir
Modified: grass/trunk/lib/init/grass.py
===================================================================
--- grass/trunk/lib/init/grass.py 2011-12-01 12:00:34 UTC (rev 49459)
+++ grass/trunk/lib/init/grass.py 2011-12-01 12:36:36 UTC (rev 49460)
@@ -44,8 +44,9 @@
else:
config_projshare = "@CONFIG_PROJSHARE@"
+# configuration directory
if sys.platform == 'win32':
- grass_config_dirname = "grass7"
+ grass_config_dirname = "GRASS7"
grass_config_dir = os.path.join(os.getenv('APPDATA'), grass_config_dirname)
else:
grass_config_dirname = ".grass7"
@@ -304,10 +305,7 @@
def set_paths():
addon_path = os.getenv('GRASS_ADDON_PATH')
if not addon_path:
- if sys.platform == 'win32':
- addon_path = os.path.join(os.getenv('APPDATA'), 'GRASS7', 'addons')
- else:
- addon_path = os.path.join(os.getenv('HOME'), '.grass7', 'addons')
+ addon_path = os.path.join(grass_config_dir, 'addons')
os.environ['GRASS_ADDON_PATH'] = addon_path
message(_("GRASS_ADDON_PATH undefined, using '%s'") % addon_path)
More information about the grass-commit
mailing list