This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
Re: [PATCH 5/5] Canonicalize manually added mirror URLs to ensure they end with a '/'
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
>> forms.
>>
>> 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.
I guess there is the separate issue of whether the items in the site chooser
list should have a terminal '/' or not. Currently they all do because that's
the form they are in mirrors.lst