[GRASS-SVN] r47602 - grass/trunk/vector/v.colors

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Aug 12 15:15:44 EDT 2011


Author: martinl
Date: 2011-08-12 12:15:44 -0700 (Fri, 12 Aug 2011)
New Revision: 47602

Modified:
   grass/trunk/vector/v.colors/main.c
Log:
v.colors: currently only vector maps from the current mapset can be modified


Modified: grass/trunk/vector/v.colors/main.c
===================================================================
--- grass/trunk/vector/v.colors/main.c	2011-08-12 13:51:16 UTC (rev 47601)
+++ grass/trunk/vector/v.colors/main.c	2011-08-12 19:15:44 UTC (rev 47602)
@@ -177,7 +177,10 @@
     Vect_open_old2(&Map, name, "", opt.field->answer);
     name   = Vect_get_name(&Map);
     mapset = Vect_get_mapset(&Map);
-    
+
+    if (strcmp(mapset, G_mapset()) != 0)
+      G_fatal_error(_("Module currently allows to modify only vector maps from the current mapset"));
+
     stat = -1;
     if (remove) {
 	stat = Vect_remove_colors(name, mapset);



More information about the grass-commit mailing list