Skip to content

Instantly share code, notes, and snippets.

@koudelka
Created February 4, 2012 19:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save koudelka/1739599 to your computer and use it in GitHub Desktop.
Save koudelka/1739599 to your computer and use it in GitHub Desktop.
Patches wget to make the --convert-links option also rewrite the provided --input-file
--- retr.c.orig 2011-08-30 08:47:33.000000000 -0500
+++ retr.c 2012-02-04 13:01:29.000000000 -0600
@@ -944,6 +944,13 @@
set_uri_encoding (iri, opt.locale, true);
set_content_encoding (iri, opt.locale);
+ int input_url_len = strlen(opt.base_href) + strlen(file) + 1;
+ char *input_url = (char *)calloc(input_url_len, sizeof(char));
+ strcat(input_url, opt.base_href);
+ strcat(input_url, file);
+ register_html(input_url, file);
+ register_download(input_url, file);
+
if (url_valid_scheme (url))
{
int dt,url_err;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment