[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [PATCH] busybox wget ignoring -P
From:       Denys Vlasenko <vda.linux () googlemail ! com>
Date:       2012-07-24 15:53:26
Message-ID: CAK1hOcMog6VPb7f5bQ=bS8o+chT1kBrYT6X=BpBhEpNTY_cejg () mail ! gmail ! com
[Download RAW message or body]

On Tue, Jul 17, 2012 at 3:23 PM, Amy Fong <amy.fong@windriver.com> wrote:
> In cases where busybox wget is invoked with -P <...> and the url ends
> in "/", the download directory is ignored (ie the file index.html is
> implied), this change enables the -P option for those urls.
> 
> Signed-off-by: Amy Fong <amy.fong@windriver.com>
> ---
> networking/wget.c |   10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
> 
> --- a/networking/wget.c
> +++ b/networking/wget.c
> @@ -589,10 +589,14 @@
> if (!(option_mask32 & WGET_OPT_OUTNAME)) {
> G.fname_out = bb_get_last_path_component_nostrip(target.path);
> /* handle "wget http://kernel.org//" */
> -               if (G.fname_out[0] == '/' || !G.fname_out[0])
> -                       G.fname_out = (char*)"index.html";
> +               if (G.fname_out[0] == '/' || !G.fname_out[0]) {
> +                       /* bug: if we provide a default name, we should still look \
> at -P option */ +                       if (G.dir_prefix)
> +                               G.fname_out = fname_out_alloc = \
> concat_path_file(G.dir_prefix, "index.html"); +                       else
> +                               G.fname_out = (char*)"index.html";
> /* -P DIR is considered only if there was no -O FILE */
> -               else {
> +               } else {
> if (G.dir_prefix)
> G.fname_out = fname_out_alloc = concat_path_file(G.dir_prefix, G.fname_out);
> else {

Fixed:

commit aacd44860129372e5d4ff1494664317f18cbb615
Author: Denys Vlasenko <vda.linux@googlemail.com>
Date:   Sun Jun 17 20:21:30 2012 +0200

    wget: fix wget-supports--P testsuite failure. Closes 4940
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic