[GRASS-user] Error while removing file
Glynn Clements
glynn at gclements.plus.com
Wed Mar 16 15:10:39 EDT 2011
António Rocha wrote:
> Ok the main problem is that I'm using r.statistics with base=new_clump10
> and cover= myscript.tmpV1
> If I try to remove new_clump I get:
> g.remove -f rast=new_clump10 at area
> [new_clump10 at area@area] is a base map for [myscript.tmpV1 at area]. Remove
> forced.
> Removing raster <LULC_new_clump10 at National>
> misc: couldn't be removed
>
> So it wasn't removed. My question is:
> 1- Why it's repeating the Mapset information (new_clump10 at area@area)
> That is odd right? Maybe that is what is messing with the system
It appears to be a bug with something not correctly handling qualified
names.
Rast_put_reclass() is a likely candidate:
sprintf(buf2, "%s@%s\n", name, G_mapset());
This should be e.g.:
xname = G_fully_qualified_name(name, G_mapset());
which will only add the mapset if the name is unqualified.
Also, the "misc: couldn't be removed" is probably because
G_is_reclassed_to() doesn't close the cell_misc/<name>/reclassed_to
file. On Windows, you cannot delete a file if it's open.
Can someone check r45681 and back-port?
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-user
mailing list