Re: [PATCH 3/7] Extract, test and enhance the logic to collapse ../foo paths.
- From
- Eric Wong <normalperson@yhbt.net>
- Date
- Sep 26, 2012, 21:54 UTC
- Message-ID
- <20120926215429.GA4637@dcvr.yhbt.net>
- In-Reply-To
- <20120926213831.GB30131@elie.Belkin>
Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 7 quoted lines
> Eric Wong wrote:
> > That said, I'd favor an implementation that split on m{/+} and
> > collapsed as Michael mentioned.
>
> Sounds sensible. Is canonicalize_path responsible for collapsing
> runs of slashes? What should _collapse_dotdot do to
> "c:/.." or "http://www.example.com/.."?It should probably just return the root path ("c:/" and "http://www.example.com/" respectively).