[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-wget] How to prevent .1.html numbering of downloaded file?
From: |
Tim Rühsen |
Subject: |
Re: [Bug-wget] How to prevent .1.html numbering of downloaded file? |
Date: |
Fri, 28 Nov 2014 22:57:22 +0100 |
User-agent: |
KMail/4.14.2 (Linux/3.16.0-4-amd64; KDE/4.14.2; x86_64; ; ) |
Am Freitag, 28. November 2014, 16:38:43 schrieb B Wooster:
> OK some more info after some debugging.
>
> Looks like the problem is in the unique_name function. At that point, it
> does not know about adjust-extensions, so it always checks for name without
> the extension. And depending on how things are queued, it can cause correct
> or incorrect behavior. Anyone know if this is an existing issue, and any
> known workaround? I can locally change wget if necessary, and will likely
> do that after I figure it out.
>
> So if things are queued like this, it is all fine:
> article (will save to article.html but calls unique_name with just
> "article" which luckily does not exist)
> article/post.html (will save to article/post.html, creating directory
> article)
>
> but this will mess it up:
> article/post.html (will save to article/post.html)
> article (will save to article.html but calls unique_name with just
> "article" which by now exists).
>
> Sorting the queue (but then it is no long a queue!) or better still:
> checking unique_name after adjust extensions has produced a suffix would
> fix this. Any one have any tips?
Thanks for having a look into the issue.
The second seems to be the better choice.
I suggest you create a python test (testenv/ directory) to have a simple
showcase that confirms your assumptions and proves your patch right (if you are
creating one).
If you are able and willing to create a test and/or patch we would appreciate
that very much. Just send it here for further discussion.
Tim
signature.asc
Description: This is a digitally signed message part.