This is the mail archive of the
mailing list for the Cygwin project.
Re: [PATCH 5/5] Canonicalize manually added mirror URLs to ensure they end with a '/'
On Wed, Nov 10, 2010 at 01:42:43PM -0700, Eric Blake wrote:
>On 11/10/2010 01:41 PM, Jon TURNEY wrote:
>> On 09/11/2010 15:07, Christopher Faylor wrote:
>>> On Tue, Nov 09, 2010 at 01:29:47PM +0000, Jon TURNEY wrote:
>>>> This ensures that the download directory is canonically named with the
>>>> trailing %2f of the url-encoded '/', avoiding downloading everything again
>>>> if the URL varies in the presence of a '/' at the end from last time.
>>>> This also prevents a mirror URL being added twice in these two different
>>>> 2010-11-07 Jon TURNEY <jon.turney-GrJqePx9RPPAJUdA+FbntA@public.gmane.org>
>>>> * site.cc (OnMessageCmd): Canonicalize manually added mirror URLS to
>>>> ensure they end with '/'
>>> Wouldn't it be better to just always strip the trailing '/' when creating the
>>> directory? That would be one less gobbledygook character.
>> I guess so, yes. Unfortunately, all the existing download directories for
>> cygwin mirrors end with %2f. If we just change the path used by stripping the
>> trailing %2f, that would leave those directories requiring manual cleanup, and
>> potentially cause their contents to get downloaded again.
>Can't we also patch things to look for a trailing %2f, and perform a
>rename() to strip it, so as to avoid the manual cleanup?
That sounds good to me. I don't think we'd run into any problems with
collisions between non-%2f ending directories. Or would we?