Browse Source

Rast__read_colors (and G_find_file2) needs name.

Fixed ticket https://trac.osgeo.org/grass/ticket/2289.


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@60225 15284696-431f-4ddb-bdfa-cd5b030d7da7
Huidae Cho 11 năm trước cách đây
mục cha
commit
356f487f05
1 tập tin đã thay đổi với 4 bổ sung4 xóa
  1. 4 4
      lib/vector/Vlib/color_read.c

+ 4 - 4
lib/vector/Vlib/color_read.c

@@ -58,13 +58,13 @@ int Vect_read_colors(const char *name, const char *mapset,
 
     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;