mirror of
https://github.com/mirror/wget.git
synced 2025-03-10 09:40:17 +08:00
[svn] Correct logic of check #6 in download_child_p.
By Larry Jones and Hrvoje Niksic.
This commit is contained in:
parent
8b9cabe004
commit
b49b6db4f1
@ -1,3 +1,15 @@
|
|||||||
|
2005-04-09 Hrvoje Niksic <hniksic@xemacs.org>
|
||||||
|
|
||||||
|
* recur.c (download_child_p): When -p is used, (temporarily)
|
||||||
|
ignore accept/reject rules for HTMLs, even when they are at the
|
||||||
|
maximum recursion depth. That is because with -p we are, if
|
||||||
|
necessary, overstepping the max. depth to get the requisites.
|
||||||
|
|
||||||
|
2004-06-12 Larry Jones <lawrence.jones@ugsplm.com>
|
||||||
|
|
||||||
|
* recur.c (download_child_p): Correct the logic in check number 6:
|
||||||
|
test opt.reclevel (not DEPTH) against INFINITE_RECURSION.
|
||||||
|
|
||||||
2005-04-09 Hrvoje Niksic <hniksic@xemacs.org>
|
2005-04-09 Hrvoje Niksic <hniksic@xemacs.org>
|
||||||
|
|
||||||
* url.c: Use "static const" in preference to "const static".
|
* url.c: Use "static const" in preference to "const static".
|
||||||
|
18
src/recur.c
18
src/recur.c
@ -516,13 +516,21 @@ download_child_p (const struct urlpos *upos, struct url *parent, int depth,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* 6. Check for acceptance/rejection rules. We ignore these rules
|
/* 6. Check for acceptance/rejection rules. We ignore these rules
|
||||||
for directories (no file name to match) and for HTML documents,
|
for directories (no file name to match) and for non-leaf HTMLs,
|
||||||
which might lead to other files that do need to be downloaded.
|
which can lead to other files that do need to be downloaded. (-p
|
||||||
That is, unless we've exhausted the recursion depth anyway. */
|
automatically implies non-leaf because with -p we can, if
|
||||||
|
necesary, overstep the maximum depth to get the page requisites.) */
|
||||||
if (u->file[0] != '\0'
|
if (u->file[0] != '\0'
|
||||||
&& !(has_html_suffix_p (u->file)
|
&& !(has_html_suffix_p (u->file)
|
||||||
&& depth != INFINITE_RECURSION
|
/* The exception only applies to non-leaf HTMLs (but -p
|
||||||
&& depth < opt.reclevel - 1))
|
always implies non-leaf because we can overstep the
|
||||||
|
maximum depth to get the requisites): */
|
||||||
|
&& (/* non-leaf */
|
||||||
|
opt.reclevel == INFINITE_RECURSION
|
||||||
|
/* also non-leaf */
|
||||||
|
|| depth < opt.reclevel - 1
|
||||||
|
/* -p, which implies non-leaf (see above) */
|
||||||
|
|| opt.page_requisites)))
|
||||||
{
|
{
|
||||||
if (!acceptable (u->file))
|
if (!acceptable (u->file))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user