[GRASS-dev] G_legal_filename and "/"

Jáchym Čepický jachym.cepicky at gmail.com
Sat Feb 3 09:29:47 EST 2007


hi Glynn,

2007/2/3, Glynn Clements <glynn at gclements.plus.com>:
>
> J-Báchym Čepický wrote:-A
>
> > IMHO "/" character is legal character in file name. I suggest change
> > line 43 in lib/gis/legal_filename.c:
> >
> >
> > -     if (*s == '/' || *s == '"' || *s == '\'' || *s <= ' ' ||
> >
> > +     if (*s == '"' || *s == '\'' || *s <= ' ' ||
> >
> > What do you think?
>
> No, "/" most definitely isn't a legal character in a filename, as it's
> used as a directory separator on all supported platforms. It's legal
> in a *pathname*, but that isn't what G_legal_filename() is meant for.
>
> --
> Glynn Clements <glynn at gclements.plus.com>
>

While using g.pnmcomp with output file specified by full path (e.g.
"/tmp/out.png"), I get the warning about Illegal character in file
name.

How to avoid this problem?

Thanks

Jachym
-- 
Jachym Cepicky
e-mail: jachym.cepicky gmail com
URL: http://les-ejk.cz
GPG: http://www.les-ejk.cz/pgp/jachym_cepicky-gpg.pub




More information about the grass-dev mailing list