[GRASS-dev] [grass-code I] g.rename fails to rename maps
glynn at gclements.plus.com
Sat Dec 22 15:56:15 EST 2007
Patton, Eric wrote:
> >The case insensitivity may have been intentional. What happens if you
> >try this with vector maps or under windows?
> >Glynn Clements <glynn at gclements.plus.com>
> Again, in spearfish:
> $ g.mlist pattern=r*
> $ g.rename vect=roads,ROADS
> Rename vector <roads> to <ROADS>
> $ g.mlist -r pattern='^[R|r]'
I meant: what happens if you remove the G_strcasecmp() check (or
replace it with strcmp()), then try it.
The problem is that the renaming code (both the generic code in
general/manage/lib/do_rename.c and the vector-specific code in
lib/vector/Vlib/map.c) deletes the destination before renaming the
source. If the source and destination are aliases for the same file
(or database table), then deleting the destination will delete the
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev