[GRASS-dev] [bug #5111] (grass) Unable to rename map if similar exists in PERMANENT

this bug's URL: http://intevation.de/rt/webrt?serial_num=5111
-------------------------------------------------------------------------

Subject: Unable to rename map if similar exists in PERMANENT

Platform: GNU/Linux/x86
grass obtained from: Trento Italy site
grass binary for platform: Compiled from Sources
GRASS Version: grass-6.2.cvs_src_snapshot_2006_08_31

I'm unable to rename raster map if map with same name exists in other
mapset. Any manipulations with maps should happen in local mapset IF not
specified othervise.

PS. It would be nice to add some hint to manual how to rename maps with
comma in name i.e. "Lake_25,5".

Example:
GRASS 6.2.0cvs (archimed):~ > g.gisenv
GISDBASE=/home/maris/gis_dati
LOCATION_NAME=archimed
MAPSET=somijai
DEBUG=0
MONITOR=x0
GRASS_GUI=tcltk
GRASS 6.2.0cvs (archimed):~ > g.rename rast=MASKA,MASK
ERROR: <MASK> already exists in mapset <PERMANENT>
GRASS 6.2.0cvs (archimed):~ >

-------------------------------------------- Managed by Request Tracker

Request Tracker wrote:

this bug's URL: http://intevation.de/rt/webrt?serial_num=5111

Subject: Unable to rename map if similar exists in PERMANENT

Platform: GNU/Linux/x86
grass obtained from: Trento Italy site
grass binary for platform: Compiled from Sources
GRASS Version: grass-6.2.cvs_src_snapshot_2006_08_31

I'm unable to rename raster map if map with same name exists in other
mapset. Any manipulations with maps should happen in local mapset IF not
specified othervise.

Having a warning for a "shadow" is a good idea; an error isn't.

PS. It would be nice to add some hint to manual how to rename maps with
comma in name i.e. "Lake_25,5".

You can't; at least not with g.rename. You will have to manually
rename the corresponding files/directories with "mv".

G_legal_filename() should be changed to prohibit commas in map names.
Probably some other characters (e.g. '@') as well.

Currently, it allows any byte between 33 and 126 inclusive except for
slash, double-quote and single-quote.

Some of those will conflict with GRASS syntax (e.g. comma, at,
equals), while others aren't legal in Windows filenames (e.g.
backslash, query, asterisk).

--
Glynn Clements <glynn@gclements.plus.com>