[GRASS-SVN] r74472 - grass/trunk/gui/wxpython/startup

svn_grass at osgeo.org svn_grass at osgeo.org
Tue May 7 12:55:59 PDT 2019


Author: mmetz
Date: 2019-05-07 12:55:59 -0700 (Tue, 07 May 2019)
New Revision: 74472

Modified:
   grass/trunk/gui/wxpython/startup/utils.py
Log:
wxGUI: use DEFAULT_WIND from PERMANENT when creating a new mapset

Modified: grass/trunk/gui/wxpython/startup/utils.py
===================================================================
--- grass/trunk/gui/wxpython/startup/utils.py	2019-05-05 20:34:03 UTC (rev 74471)
+++ grass/trunk/gui/wxpython/startup/utils.py	2019-05-07 19:55:59 UTC (rev 74472)
@@ -75,12 +75,12 @@
     mapset_path = os.path.join(location_path, mapset)
     # create an empty directory
     os.mkdir(mapset_path)
-    # copy WIND file and its permissions from PERMANENT
-    # this uses PERMANENT's current region instead of default (?)
-    region_file = 'WIND'
-    region_path = os.path.join(location_path, 'PERMANENT', region_file)
-    shutil.copy(region_path, mapset_path)
-    # set permissions to u+rw,go+r (disabled)
+    # copy DEFAULT_WIND file and its permissions from PERMANENT 
+    # to WIND in the new mapset
+    region_path1 = os.path.join(location_path, 'PERMANENT', 'DEFAULT_WIND')
+    region_path2 = os.path.join(location_path, mapset, 'WIND')
+    shutil.copy(region_path1, region_path2)
+    # set permissions to u+rw,go+r (disabled; why?)
     # os.chmod(os.path.join(database,location,mapset,'WIND'), 0644)
 
 



More information about the grass-commit mailing list