On Wed, Jul 06, 2005 at 02:06:19PM -0500, Ken Williams wrote: > On Jul 6, 2005, at 11:29 AM, Michael G Schwern via RT wrote: > > >[tomdinger - Tue Feb 24 10:15:24 2004]: > >>Under Windows (using File::Spec::Win32), the call > >>File::Spec->canonpath('a\\..\\..\\b\\c') returns the wrong value: > >>'b\\c'. > >>It should return '..\\b\\c'. > > > >Hey Ken, want to have a look at this? There's a patch and everything! > > If Win32 is going to be handled like Unix, then it should return the > input verbatim (".." is not cleaned up). Is there a reason it should > be different on Win32?
That's not the issue. b\c is right out wrong. Examine the path closer. a\..\..\b\c "a\.." cancels out leaving "..\b\c". Or, if you don't want to clean up .. it can be a\..\..\b\c. But b\c is clearly wrong. PS Offhand the reason I can think for cleaning up .. on Win32 is because it tends to not have symlinks to worry about so a\..\a\ should equal a\ -- Michael G Schwern [EMAIL PROTECTED] http://www.pobox.com/~schwern Just call me 'Moron Sugar'. http://www.somethingpositive.net/sp05182002.shtml