Mail Archives: djgpp-workers/2000/08/25/07:39:36
Eli Zaretskii wrote:
> > In general, is it OK to follow GIGO principle for insane paths? (provided,
> > that 'garbage-in' part does not cause any crashes, infinite loops etc.)
>
> The only rule is that if some insane file name succeeds, so should
> what you return. And it shouldn't crash if the original one doesn't.
OK then.
> > > Also, what about file names such as /dev/env/FOO or /dev/c/foo? Does
> > > this code DTRT for them?
> >
> > Can't imagine why.
>
> Sorry, I don't understand: will it work or not?
Sorry, I was really unclear. I've checked - it works.
> I was afraid that removing FOO from /dev/env/FOO will cause it to
> fail, since /dev/env doesn't have a meaning without the variable
> name. And the same with /dev/c/foo.
The key there is that /dev/env/ nor /dev/c/ cannot be symlinks in any
form. And if they are not symlinks, __solve_[dir_]symlinks just return
them back. In this sense /dev/env/blah does not differ from /path/foo/bar,
that's why it works.
So I commit this patch, and I will post a patch for /dev/blah paths in
testsuite very soon.
Laurynas
- Raw text -