Dumb Windows path parsing

Kenneth Brody kenbrody at bestweb.net
Tue Nov 29 08:35:53 PST 2005


Quoting GCC (Tue, 29 Nov 2005 11:26:12 -0500):
[...]
> > Well, I've just come across a "strangeness" in how Windows
> > parses pathnames.  It turns out that "." and ".." are parsed
> > before the path is actually referenced.  In other words, ".."
> > just removes the lowest-level part of the current pathname
> > without actually checking that part.
> >
> > For example, "c:\no\such\path\..\..\..\appl\bad_dir\..\fp" is
> > the same as "c:\appl\fp", even if no "\no" or "\appl\bad_dir"
> > directories exist.
[...]
> Tried this:
>
> W:\>cd w:\no\such\.\path\.\..\foo\..\..\ccp\filepro
> The system cannot find the path specified.
>
> What were you doing when you discovered the above?
>
> The ccp\filepro does exist.

The above path requires that "w:\no" exists.  (You go down 4 levels,
but only up 3, prior to "\ccp".)  Add another ".." piece.

--
KenBrody at BestWeb dot net        spamtrap: <g8ymh8uf001 at sneakemail.com>
http://www.hvcomputer.com
http://www.fileProPlus.com


More information about the Filepro-list mailing list