X-Git-Url: http://sjero.net/git/?a=blobdiff_plain;f=src%2Frecur.c;h=b6ba1d9558cb3b163eda8b33e3ac6f11046e553e;hb=359dd167602071cfa62d6c586ca846ede5ed7c29;hp=72274fb52673c36f0924ccbfb1dbc306b5f12bfa;hpb=f5a10978710a3e9907fbef31b7df9f414acccb16;p=wget diff --git a/src/recur.c b/src/recur.c index 72274fb5..b6ba1d95 100644 --- a/src/recur.c +++ b/src/recur.c @@ -1,6 +1,6 @@ /* Handling of recursive HTTP retrieving. Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, - 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, + 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. This file is part of GNU Wget. @@ -253,26 +253,23 @@ retrieve_tree (struct url *start_url_parsed, struct iri *pi) the second time. */ if (dl_url_file_map && hash_table_contains (dl_url_file_map, url)) { + bool is_css_bool; + file = xstrdup (hash_table_get (dl_url_file_map, url)); DEBUGP (("Already downloaded \"%s\", reusing it from \"%s\".\n", url, file)); - /* this sucks, needs to be combined! */ - if (html_allowed - && downloaded_html_set - && string_set_contains (downloaded_html_set, file)) - { - descend = true; - is_css = false; - } - if (css_allowed - && downloaded_css_set - && string_set_contains (downloaded_css_set, file)) - { - descend = true; - is_css = true; - } + if ((is_css_bool = (css_allowed + && downloaded_css_set + && string_set_contains (downloaded_css_set, file))) + || (html_allowed + && downloaded_html_set + && string_set_contains (downloaded_html_set, file))) + { + descend = true; + is_css = is_css_bool; + } } else { @@ -641,7 +638,7 @@ download_child_p (const struct urlpos *upos, struct url *parent, int depth, files after downloading or we're just running a spider. */ if (opt.delete_after || opt.spider) { - logprintf (LOG_VERBOSE, "Removing %s.\n", rfile); + logprintf (LOG_VERBOSE, _("Removing %s.\n"), rfile); if (unlink (rfile)) logprintf (LOG_NOTQUIET, "unlink: %s\n", strerror (errno));