bug-wget
[Top][All Lists]
Advanced

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

Re: [Bug-wget] Any explanation for the '-nc' returned value?


From: Tim Rühsen
Subject: Re: [Bug-wget] Any explanation for the '-nc' returned value?
Date: Sun, 29 Jul 2018 12:17:15 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

Hi,

from the man pages (--no-clobber):

########
           When running Wget without -N, -nc, -r, or -p, downloading the
same file in the same directory will result
           in the original copy of file being preserved and the second
copy being named file.1.  If that file is
           downloaded yet again, the third copy will be named file.2,
and so on.  (This is also the behavior with
           -nd, even if -r or -p are in effect.)  When -nc is specified,
this behavior is suppressed, and Wget will
           refuse to download newer copies of file.  Therefore,
""no-clobber"" is actually a misnomer in this
           mode---it's not clobbering that's prevented (as the numeric
suffixes were already preventing clobbering),
           but rather the multiple version saving that's prevented.
########

Regards, Tim

On 28.07.2018 15:52, Yuxi Hao wrote:
> Hi Guys,
> 
>  
> 
> The source code is:
> 
> ////////////////////////
> 
>       if (opt.noclobber && file_exists_p(opt.output_document, NULL))
> 
>            {
> 
>               /* Check if output file exists; if it does, exit. */
> 
>               logprintf (LOG_VERBOSE,
> 
>                          _("File %s already there; not retrieving.\n"),
> 
>                          quote (opt.output_document));
> 
>               exit (WGET_EXIT_GENERIC_ERROR);
> 
>            }
> 
> ////////////////////////
> 
>  
> 
> No explanation on it:
> 
> https://www.gnu.org/software/wget/manual/html_node/Exit-Status.html
> 
>  
> 
> I am confused on this. If it works as specified, why don’t we return succeed?
> 
>  
> 
> Best Regards,
> 
> YX Hao
> 
>  
> 

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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