[GRASS-SVN] r60225 - grass/trunk/lib/vector/Vlib

svn_grass at osgeo.org svn_grass at osgeo.org
Tue May 13 05:26:12 PDT 2014


Author: hcho
Date: 2014-05-13 05:26:12 -0700 (Tue, 13 May 2014)
New Revision: 60225

Modified:
   grass/trunk/lib/vector/Vlib/color_read.c
Log:
Rast__read_colors (and G_find_file2) needs name.

Fixed ticket #2289.


Modified: grass/trunk/lib/vector/Vlib/color_read.c
===================================================================
--- grass/trunk/lib/vector/Vlib/color_read.c	2014-05-13 10:48:23 UTC (rev 60224)
+++ grass/trunk/lib/vector/Vlib/color_read.c	2014-05-13 12:26:12 UTC (rev 60225)
@@ -58,13 +58,13 @@
 
     if (strcmp(mapset, G_mapset()) == 0) {
         /* look for the regular color table */
-	sprintf(buf, "%s/%s/%s", GV_DIRECTORY, name, GV_COLR_ELEMENT);
-        ret = Rast__read_colors(buf, "", mapset, colors);
+	sprintf(buf, "%s/%s", GV_DIRECTORY, name);
+        ret = Rast__read_colors(buf, GV_COLR_ELEMENT, mapset, colors);
     }
     else {
 	/* look for secondary color table in current mapset */
-	sprintf(buf, "%s/%s/%s", GV_COLR2_DIRECTORY, mapset, name);
-        ret = Rast__read_colors(buf, "", G_mapset(), colors);
+	sprintf(buf, "%s/%s", GV_COLR2_DIRECTORY, mapset);
+        ret = Rast__read_colors(buf, name, G_mapset(), colors);
     }
     if (ret == -2)
 	return 0;



More information about the grass-commit mailing list