From 9b21660d70fd20919d6350820a482285d699fa2e Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Fri, 5 Aug 2011 22:39:55 +0200 Subject: [PATCH] Accept always the file if it is the specified output destination. --- NEWS | 3 +++ src/ChangeLog | 6 ++++++ src/utils.c | 3 +++ 3 files changed, 12 insertions(+) diff --git a/NEWS b/NEWS index 16f18640..4d5e31b2 100644 --- a/NEWS +++ b/NEWS @@ -62,6 +62,9 @@ Please send GNU Wget bug reports to . ** Now --no-parent doesn't fetch undesired files if HTTP and HTTPS are used by the same host on different pages. + +** Do not attempt to remove the file if it is not in the accept rules but + it is the output destination file. * Changes in Wget 1.12 diff --git a/src/ChangeLog b/src/ChangeLog index c3b9b56c..b50e33f6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2011-08-05 Giuseppe Scrivano + + * utils.c (acceptable): Accept the file if it is the specified output + destination. + Reported by: Shai Berger + 2011-08-05 Giuseppe Scrivano * gnutls.c (ssl_connect_wget): Use `gnutls_priority_set_direct' instead diff --git a/src/utils.c b/src/utils.c index 352cdb7b..a4367105 100644 --- a/src/utils.c +++ b/src/utils.c @@ -875,6 +875,9 @@ acceptable (const char *s) { int l = strlen (s); + if (opt.output_document && strcmp (s, opt.output_document) == 0) + return true; + while (l && s[l] != '/') --l; if (s[l] == '/') -- 2.39.2