bug-wget
[Top][All Lists]
Advanced

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

Re: [Bug-wget] --unlink is ineffective


From: Tim Ruehsen
Subject: Re: [Bug-wget] --unlink is ineffective
Date: Wed, 23 Nov 2016 16:17:59 +0100
User-agent: KMail/5.2.3 (Linux/4.8.0-1-amd64; KDE/5.28.0; x86_64; ; )

On Wednesday, October 26, 2016 4:11:02 PM CET Piotr Figiel wrote:
> Hi,
> there seem to be an issue with wget. Whenever you run it with --unlink and
> the file already exists locally the file is not overwritten. It appears
> that the decision whether to unlink is made after a new numbered name is
> generated and stored in hs->local_file. As before unlink() a check is done
> vs the new name the file with original name is never deleted.
> 
> Per wget manual:
>        --unlink
>            Force Wget to unlink file instead of clobbering existing file.
> This option is useful for downloading to the directory with hardlinks.
> 
> I'd expect it to unlink the file instead of creating a new name for it.
> This was reproduced with http on wget 1.15 and 1.17.1.

This option needs 'clobbering' to be in effect. And even then it removes the 
original only under certain circumstances.
I do not know the history of it, but a look at the source code reveals that 
one of some flags must be active:
-nc
-N
-c
--p and not --r
-r
-m
-O
--backups (with value > 0)

Regards, Tim

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

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