[PATCH 5/5] Canonicalize manually added mirror URLs to ensure they end with a '/'

Eric Blake eblake@redhat.com
Wed Nov 10 21:42:00 GMT 2010


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
>>> 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.

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?

-- 
Eric Blake   eblake@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://cygwin.com/pipermail/cygwin-apps/attachments/20101110/277301b4/attachment.sig>


More information about the Cygwin-apps mailing list