mirror of
https://github.com/mirror/wget.git
synced 2025-03-23 00:00:14 +08:00
Accept metalink files specified as URLs. Better counting of the files downloaded in retrieve_from_file.
This commit is contained in:
parent
9fd1e97e40
commit
bb28bda88f
13
src/retr.c
13
src/retr.c
@ -1000,7 +1000,10 @@ retrieve_from_file (const char *file, bool html, int *count)
|
||||
|
||||
input_file = url_file;
|
||||
}
|
||||
else if(metalink = metalink_context(url))
|
||||
else
|
||||
input_file = (char *) file;
|
||||
|
||||
if(metalink = metalink_context(input_file))
|
||||
{
|
||||
/*GSoC wget*/
|
||||
char *command, **files;
|
||||
@ -1148,6 +1151,7 @@ retrieve_from_file (const char *file, bool html, int *count)
|
||||
}
|
||||
else
|
||||
{
|
||||
++*count;
|
||||
sprintf(command, "cat ");
|
||||
j=0;
|
||||
r = 4;
|
||||
@ -1182,14 +1186,10 @@ retrieve_from_file (const char *file, bool html, int *count)
|
||||
free(ranges);
|
||||
free(thread_ctx);
|
||||
|
||||
*count = i;
|
||||
iri_free (iri);
|
||||
metalink_delete(metalink);
|
||||
/*What exactly to return MUST be reconsidered.*/
|
||||
return status;
|
||||
}
|
||||
else
|
||||
input_file = (char *) file;
|
||||
{
|
||||
|
||||
url_list = (html ? get_urls_html (input_file, NULL, NULL, iri)
|
||||
: get_urls_file (input_file));
|
||||
@ -1254,6 +1254,7 @@ Removing file due to --delete-after in retrieve_from_file():\n"));
|
||||
|
||||
/* Free the linked list of URL-s. */
|
||||
free_urlpos (url_list);
|
||||
}
|
||||
|
||||
iri_free (iri);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user