+2003-10-30 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * retr.c (retrieve_from_file): Use retrieve_tree for
+ page-requisites.
+
+ * main.c (main): Don't define opt.recursive when -p is used.
+ Instead, make sure that recursion is used for HTTP in that case.
+
2003-10-29 Hrvoje Niksic <hniksic@xemacs.org>
* host.h: Defined accessors for elements of ip_address. Updated
if (opt.page_requisites && !opt.recursive)
{
- opt.recursive = TRUE;
+ /* Don't set opt.recursive here because it would confuse the FTP
+ code. Instead, call retrieve_tree below when either
+ page_requisites or recursive is requested. */
opt.reclevel = 0;
if (!opt.no_dirstruct)
- opt.dirstruct = TRUE; /* usually handled by cmd_spec_recursive() */
+ opt.dirstruct = 1; /* normally handled by cmd_spec_recursive() */
}
if (opt.verbose == -1)
char *filename = NULL, *redirected_URL = NULL;
int dt;
- if (opt.recursive && url_scheme (*t) != SCHEME_FTP)
+ if ((opt.recursive || opt.page_requisites)
+ && url_scheme (*t) != SCHEME_FTP)
status = retrieve_tree (*t);
else
status = retrieve_url (*t, &filename, &redirected_URL, NULL, &dt);
opt.input_filename);
}
/* Print the downloaded sum. */
- if (opt.recursive
+ if (opt.recursive || opt.page_requisites
|| nurl > 1
|| (opt.input_filename && total_downloaded_bytes != 0))
{
them. If HTML is non-zero, treat the file as HTML, and construct
the URLs accordingly.
- If opt.recursive is set, call recursive_retrieve() for each file. */
+ If opt.recursive is set, call retrieve_tree() for each file. */
+
uerr_t
retrieve_from_file (const char *file, int html, int *count)
{
status = QUOTEXC;
break;
}
- if (opt.recursive && cur_url->url->scheme != SCHEME_FTP)
+ if ((opt.recursive || opt.page_requisites)
+ && cur_url->url->scheme != SCHEME_FTP)
status = retrieve_tree (cur_url->url->url);
else
status = retrieve_url (cur_url->url->url, &filename, &new_file, NULL, &dt);