[GRASS-dev] [grass-code I][566] g.rename fails to rename maps
Glynn Clements
glynn at gclements.plus.com
Sat Dec 22 15:49:06 EST 2007
Moritz Lennert wrote:
> >>>>> It's in manage:
> >>>>> http://trac.osgeo.org/grass/browser/grass/trunk/general/manage/cmd
> >>>>> Moritz
> >>>> Thanks for the pointer. Is it still a bug, though? Can anyone confirm?
> >>> Yup. It's due to line 28 in /general/manage/lib/do_rename.c (line
> >>>
> >>> if (G_strcasecmp (old,new) == 0) return 1;
> >>>
> >>> If you comment this out and recompile the lib and the command, it works.
> >>> No idea why this is there. Unless someone objects, I'll remove that line.
> >> Actually it is due to:
> >> http://freegis.org/cgi-bin/viewcvs.cgi/grass6/general/manage/lib/do_rename.c.diff?r1=1.6&r2=1.7
> >>
> >> where strcmp was replaced with G_strcasecmp, thus making the compare
> >> case independent. So, the line should not be removed, but it should
> >> either be reverted to strcmp, or we need G_strcmp, which doesn't exist
> >> at this stage AFAICT.
> >
> > The case insensitivity may have been intentional. What happens if you
> > try this with vector maps
>
> Seems to work alright. Why should it be different from raster maps ?
Vector map names may be used as SQL column names, which aren't case
sensitive.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list