Created
February 4, 2012 19:24
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- 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