Browse Source

r.reclass: Delete fp raster maps only (trunk, https://trac.osgeo.org/grass/changeset/61165)

git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@61368 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Neteler 10 năm trước cách đây
mục cha
commit
d131da90c8
1 tập tin đã thay đổi với 2 bổ sung5 xóa
  1. 2 5
      raster/r.reclass/reclass.c

+ 2 - 5
raster/r.reclass/reclass.c

@@ -227,15 +227,12 @@ int reclass(const char *old_name, const char *old_mapset,
 	_reclass(rules, cats, &new);
     }
 
-    if (G_find_file2("cell", new_name, G_mapset())) {
-	G_suppress_warnings(1);
-
+    if (G_find_file2("cell", new_name, G_mapset()) &&
+	Rast_map_type(new_name, G_mapset()) != CELL_TYPE) {
 	M_read_list(FALSE, NULL);
         if (M_do_remove(M_get_element("rast"), new_name) == 1)
 	    G_fatal_error(_("Cannot overwrite existing raster map <%s>"),
 			  new_name);
-
-	G_suppress_warnings(0);
     }
 
     if (Rast_put_reclass(new_name, &new) < 0)