On approximately 7/6/2005 1:10 PM, came the following characters from
the keyboard of Ken Williams:
On Jul 6, 2005, at 2:50 PM, Michael G Schwern wrote:
That's not the issue. b\c is right out wrong. Examine the path closer.
"a\.." cancels out leaving "..\b\c".
Right, I understand the bug, I'm just trying to get the right fix. Note
that I suggested that it return that particular input string verbatim.
PS Offhand the reason I can think for cleaning up .. on Win32 is
tends to not have symlinks to worry about so a\..\a\ should equal a\
"tends not to" isn't a good enough reason in this case. If it treats
them differently, though, that might be a good enough reason.
So how do Windows' "shortcuts" fit into this? They act a lot like
softlinks interactively in Windows Explorer (but not, AFAICT, from the
And then the newer versions of NTFS support "reparse points" and
"junction points". How do they fit into this? I have no experience
with these, but it sounds like they act a lot more like Unix links.
Hence potentially making a\.. elimination problematical. Which may bea
good reason for name canonicalization on Windows to not attempt to
remove .. sequences... there is lots of Windows code out there that does
do that, of course, I've written some of it myself... but as Windows
changes, compatibility to itself is not guaranteed.
Glenn -- http://nevcal.com/
Having identified a vast realm of ignorance, Wolfram is saying that much
of this realm lies forever outside the light cone of human knowledge.
-- Michael Swaine, Dr Dobbs Journal, Sept 2002