From c5dc4d16646c186218be509d35e20b6a6203b13b Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Thu, 21 Oct 2010 13:27:31 +0200 Subject: [PATCH] Remove unnecessary code. --- src/ChangeLog | 5 +++++ src/retr.c | 15 +++++---------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 93f46678..7b8c1772 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2010-10-21 Giuseppe Scrivano + + * retr.c (retrieve_url): Do not register HTML files twice. + Reported by: Manfred Koizar . + 2010-10-18 Manfred Koizar (tiny change) * html-url.c (tag_handle_link): Do not assume external links type diff --git a/src/retr.c b/src/retr.c index 0eeb1248..83f47bee 100644 --- a/src/retr.c +++ b/src/retr.c @@ -871,20 +871,15 @@ retrieve_url (struct url * orig_parsed, const char *origurl, char **file, if (local_file && u && *dt & RETROKF) { register_download (u->url, local_file); + if (redirection_count && 0 != strcmp (origurl, u->url)) register_redirection (origurl, u->url); + if (*dt & TEXTHTML) register_html (u->url, local_file); - if (*dt & RETROKF) - { - register_download (u->url, local_file); - if (redirection_count && 0 != strcmp (origurl, u->url)) - register_redirection (origurl, u->url); - if (*dt & TEXTHTML) - register_html (u->url, local_file); - if (*dt & TEXTCSS) - register_css (u->url, local_file); - } + + if (*dt & TEXTCSS) + register_css (u->url, local_file); } if (file)