This is the mail archive of the cygwin-apps mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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

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  <>
>>> 	* (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    +1-801-349-2682
Libvirt virtualization library

Attachment: signature.asc
Description: OpenPGP digital signature

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]