Mail Archives: djgpp-workers/2000/08/25/08:10:23
> Date: Fri, 25 Aug 2000 11:40:14 +0200
> From: Laurynas Biveinis <lauras AT softhome DOT net>
>
> > Imagine an argument such
> > as "c:/foo///////////////////////////////////////////////////////".
>
> What would be sane response to this arg? My current code after some,
> uhm, resolving would return the same c:/foo/////.../ with one slash less.
Ah, okay then. I don't know why did I think it will make any
trouble. Returning one slash less is okay, I think.
> 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.
> > 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?
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.
- Raw text -