[GRASS-dev] g.mlist as C implementation?

Hamish hamish_nospam at yahoo.com
Fri Sep 14 00:24:09 EDT 2007


Glynn Clements wrote:
> > We could add : and | to the G_legal_filename() blacklist, even though
> > that could hurt backwards compatibility if the fn is used to
> > test ,,old_map names. Esp. that, as you point out, calling a map "C:"
> > is problematic on Windows. (my vote it is to do it after making sure
> > that g.rename doesn't call G_legal_filename() for the old map name)
> 
> I suggest only using G_legal_filename for new files/mapsets/etc. For
> existing files, just try to find the named object; if the name was
> never legal, then it won't exist.


FWIW I just tested this by renaming a vector/ map dir in the file system
to put a space in the name, g.list shows it but g.rename gives an error:

G:vector > g.rename vect="map 1","map:1"
Illegal filename. Character < > not allowed.
WARNING: vector <map 1> not found


[g.list -gf]
Hamish:
> > > map2 at user1:This map has a title
> My two preferred choices would be : or |.
>  ":" mimics what we use for deg:min:sec separators and makes some
>     contextual sense as a sep.
>  "|" mimics what we use for vector attribute column separators.
> 
> (trying to reuse ideas wherever possible for consistency's sake)
Glynn:
> Actually, I'll change my preference for using a comma as the separator
> to a preference for using a space. That's almost certain to occur in
> titles (but cannot occur in names), so that will almost guarantee that
> any scripts handle the separator correctly.

a space is fine with me...


Hamish




More information about the grass-dev mailing list