[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] [PATCH] Adjust_extension appends an extra .html to .htm

From: Ángel González
Subject: Re: [Bug-wget] [PATCH] Adjust_extension appends an extra .html to .htm
Date: Wed, 21 Mar 2012 00:11:31 +0100
User-agent: Thunderbird

On 20/03/12 22:41, Giuseppe Scrivano wrote:
> AIDA Shinra <address@hidden> writes:
>> --- wget-1.13.4/src/http.c.orig      2011-09-07 10:58:01.000000000 +0000
>> +++ wget-1.13.4/src/http.c   2012-03-19 13:58:29.000000000 +0000
>> @@ -3517,7 +3517,7 @@
>>    char *last_period_in_local_filename = strrchr (hs->local_file, '.');
>>    char shortext[8];
>>    int len = strlen (ext);
>> -  if (len == 5)
>> +  if (len == 4)
> I am not sure the patch is correct.  `ext' includes the dot '.'
> character so 5 seems ok there.  In any case, I wasn't able to reproduce
> the problem, at least in my locale.  What locale are you using?  Can you
> please provide a test case?
> Thanks,
> Giuseppe
It also looked incorrect to me (and couldn't reproduce it). I don't like
the way that
function is coded, though. Passing the two suitable extensions as
would have been much cleaner.

I have attached some tests with the current behavior, just so this would
be catched
if it ever happened.
Test-adjust-extension-multiple-files.px seems to be exposing a bug in
the adjust
extension naming of repeated filenames. See the pattern of expected files:
dummy.css, dummy.css.1.css, dummy.css.1.1.css, dummy.css.1.2.css,

Attachment: adjust-extension-tests.diff
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]