Преглед изворни кода

move creation of .grass7 directory the first time that you run grass7, not at the end of first session

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@59106 15284696-431f-4ddb-bdfa-cd5b030d7da7
Luca Delucchi пре 11 година
родитељ
комит
ae86e6da8f
1 измењених фајлова са 3 додато и 2 уклоњено
  1. 3 2
      lib/init/grass.py

+ 3 - 2
lib/init/grass.py

@@ -1239,6 +1239,9 @@ os.environ['GRASS_VERSION'] = grass_version
 gis_lock = str(os.getpid())
 os.environ['GIS_LOCK'] = gis_lock
 
+if not os.path.exists(grass_config_dir):
+    os.mkdir(grass_config_dir)
+
 # Set the global grassrc file
 batch_job = os.getenv('GRASS_BATCH_JOB')
 if batch_job:
@@ -1374,8 +1377,6 @@ try_remove(lockfile)
 
 # Save GISRC
 s = readfile(gisrc)
-if not os.path.exists(grass_config_dir):
-    os.mkdir(grass_config_dir)
 writefile(gisrcrc, s)
 
 cleanup()