[M3devel] Revert cm3 to version 6 days ago
Jay
jayk123 at hotmail.com
Mon Feb 25 09:33:52 CET 2008
got truncated again...
Here is an unnecessarily complete explanation: The problem was Given "a../..", M3Path.FixPath wasn't doing anything. I wanted to fix that. It would collapse "a/.." or ".a/.." or "a./.." correctly, but not "a../.." I know people will disagree as to what is "correct" due to symlinks, but this was/is the behavior. Given input like "../.." it should also leave that alone, because "there is nowhere for it to go". In fixing "a../.." to collapse to nothing or ".", I also broke leaving "../.." alone. I thought the check for "is the element prior to ".." also ".."?" wasn't needed, since they get removed, left to right, and the scan is restarted for every change, but they aren't removed if "there is nowhere to go", so the check is valid. But the check wasn't right. It didn't check for a ".." element, it checked for an element ending in "..". NOW it should be treating them both correctly, as well as not indexing out of bounds for other input as it was doing.I added a check that the previous element is of length 2, and "ends" "..". Yes, I realize that elements ending in ".." but not equal to ".." are rare and not particularly interesting.Windows even has trouble with them: C:\>mkdir a.. C:\>dir a* 02/25/2008 12:11 AM <DIR> a Huh? C:\>mkdir \\?\c:\a.. C:\>dir a* 02/25/2008 12:11 AM <DIR> a 02/25/2008 12:12 AM <DIR> a.. C:\>rmdir a.. C:\>dir a* 02/25/2008 12:12 AM <DIR> a.. Huh? - Jay
_________________________________________________________________
Need to know the score, the latest news, or you need your Hotmail®-get your "fix".
http://www.msnmobilefix.com/Default.aspx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20080225/19615122/attachment-0002.html>
More information about the M3devel
mailing list