Dumb Windows path parsing
GCC
gccconsulting at comcast.net
Tue Nov 29 08:26:12 PST 2005
> -----Original Message-----
> From: filepro-list-bounces at lists.celestial.com
> [mailto:filepro-list-bounces at lists.celestial.com] On Behalf
> Of Kenneth Brody
> Sent: Monday, November 28, 2005 10:38 PM
> To: filePro_mailing_list
> Subject: OT: Dumb Windows path parsing
>
> 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.
>
> You can also intersperse "." at will.
>
> c:\no\such\.\path\.\..\..\foo\..\.\..\appl\fp
>
> Each "." is simply ignored, and each ".." moves "up" one "directory"
> in the path that's being built.
>
> --
> KenBrody at BestWeb dot net spamtrap:
> <g8ymh8uf001 at sneakemail.com>
> http://www.hvcomputer.com
> http://www.fileProPlus.com
> _______________________________________________
Ken,
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.
Richard Kreiss
GCC Consulting
More information about the Filepro-list
mailing list