wget-dev
[Top][All Lists]
Advanced

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

Re: wget2 | Added --convert-file-only handling (!456)


From: Tim Rühsen
Subject: Re: wget2 | Added --convert-file-only handling (!456)
Date: Tue, 05 Nov 2019 14:53:07 +0000



Tim Rühsen started a new discussion on src/wget.c: 
https://gitlab.com/gnuwget/wget2/merge_requests/456#note_240303443

> +             // find the filename part of the linkpath
> +             for (link_basename = p1 = linkname; *p1 != '\"'; p1++)
> +                     if (*p1 == '/') link_basename = p1+1;
> +
> +             // find the filename part of the real filepath
> +             for (local_basename = p2 = localname; *p2; p2++)
> +                     if (*p2 == '/') local_basename = p2+1;
> +
> +             wget_buffer_memcpy(buf, linkname, link_basename-linkname);
> +             wget_buffer_strcat(buf, local_basename);
> +
> +             wget_info_printf("  %.*s -> %s\n", (int) url->len,  linkname, 
> localname); // no translation
> +             wget_info_printf("       -> %s\n", buf->data); // no translation
> +     } else {
> +             // insert initial URL without any change
> +             wget_buffer_memcpy(buf, url->p, url->len);

Is this correct ? Doesn't `buf` already hold the original URL, like 
`convert_link_whole()` assumes ?

-- 
Reply to this email directly or view it on GitLab: 
https://gitlab.com/gnuwget/wget2/merge_requests/456#note_240303443
You're receiving this email because of your account on gitlab.com.




reply via email to

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