]> sjero.net Git - wget/commitdiff
Accept always the file if it is the specified output destination.
authorGiuseppe Scrivano <gscrivano@gnu.org>
Fri, 5 Aug 2011 20:39:55 +0000 (22:39 +0200)
committerGiuseppe Scrivano <gscrivano@gnu.org>
Fri, 5 Aug 2011 20:39:55 +0000 (22:39 +0200)
NEWS
src/ChangeLog
src/utils.c

diff --git a/NEWS b/NEWS
index 16f18640df1135be1872e3bcdc6025763912cda2..4d5e31b27bc3d38ce3749dba2af3b4094e9ce20b 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -62,6 +62,9 @@ Please send GNU Wget bug reports to <bug-wget@gnu.org>.
 
 ** 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.
 \f
 * Changes in Wget 1.12
 
index c3b9b56c594f6e15e22bb667401e31eae0de0f53..b50e33f60debe1e000743ae73a35842836ccb79c 100644 (file)
@@ -1,3 +1,9 @@
+2011-08-05  Giuseppe Scrivano  <gscrivano@gnu.org>
+
+       * utils.c (acceptable): Accept the file if it is the specified output
+       destination.
+       Reported by: Shai Berger <shai@platonix.com>
+
 2011-08-05  Giuseppe Scrivano  <giuseppe@southpole.se>
 
        * gnutls.c (ssl_connect_wget): Use `gnutls_priority_set_direct' instead
index 352cdb7b5afc14f02b5f40c7dc85f95d502af5b0..a43671057085906ef2520cad78c2d58395edc170 100644 (file)
@@ -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] == '/')