]> sjero.net Git - wget/commitdiff
Exit with failure if -k is specified and -O is not a regular file.
authorGiuseppe Scrivano <gscrivano@gnu.org>
Thu, 27 May 2010 10:45:15 +0000 (12:45 +0200)
committerGiuseppe Scrivano <gscrivano@gnu.org>
Thu, 27 May 2010 10:45:15 +0000 (12:45 +0200)
NEWS
doc/ChangeLog
doc/wget.texi
src/ChangeLog
src/main.c

diff --git a/NEWS b/NEWS
index e6cc336d1d09d00a9e99df593a822051fd637c2d..6faae62ef6f5bec0a8e1405df572de21d260f61b 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -17,6 +17,8 @@ Please send GNU Wget bug reports to <bug-wget@gnu.org>.
 ** Ignore zero length domains in $no_proxy.
 
 ** Set new cookies after an authorization failure.
+
+** Exit with failure if -k is specified and -O is not a regular file.
 \f
 * Changes in Wget 1.12
 
index 3193d925a3bc2fd82a9b42ccd822547d45d48c67..f04334d6ba3c56312d370ac5df746e6ce18f930f 100644 (file)
@@ -1,3 +1,8 @@
+2010-05-27  Giuseppe Scrivano  <gscrivano@gnu.org>
+
+       * wget.texi (Download Options): Document that -k can be used with -O
+       only with regular files.
+
 2010-05-08  Giuseppe Scrivano  <gscrivano@gnu.org>
 
        * Makefile.am: Update copyright years.
 
 2008-11-15  Steven Schubiger  <stsc@members.fsf.org>
 
-       * sample.wgetrc: Comment the waitretry "default" value, 
+       * sample.wgetrc: Comment the waitretry "default" value,
        because there is a global one now.
 
-       * wget.texi (Download Options): Mention the global 
+       * wget.texi (Download Options): Mention the global
        default value.
 
 2008-11-10  Micah Cowan  <micah@cowan.name>
        added subsection headings.
 
        Update node pointers.
-       
+
 2008-11-05  Micah Cowan  <micah@cowan.name>
 
        * wget.texi: Move --no-http-keep-alive from FTP Options to HTTP
 
 2008-09-30  Steven Schubiger  <stsc@members.fsf.org>
 
-       * wget.texi (Wgetrc Commands): Add default_page, save_headers, 
+       * wget.texi (Wgetrc Commands): Add default_page, save_headers,
        spider and user_agent to the list of recognized commands.
 
 2008-09-10  Michael Kessler  <kessler.michael@aon.at>
        to 1.4.
 
 2005-02-11  Mauro Tortonesi  <mauro@ferrara.linux.it>
-       
+
        * wget.texi: Added Simone Piunno as new contributor.
-       
+
 2005-01-01  Mauro Tortonesi  <mauro@ferrara.linux.it>
 
        * wget.texi: Updated copyright information, added new contributors.
 
 2004-11-20  Hans-Andreas Engel  <engel@node.ch>
-       
+
        * wget.texi: Describe limitations of combining `-O' with `-k'.
 
 2004-05-13  Nico R.  <n-roeser@gmx.net>
        * wget.texi (Recursive Retrieval Options): Explained that you need
        to use -r -l1 -p to get the two levels of requisites for a
        <FRAMESET> page.  Also made a few other wording improvements.
-       
+
 2001-03-17  Dan Harkless  <wget@harkless.org>
 
-       * Makefile.in: Using '^' in the sed call caused a weird failure on 
+       * Makefile.in: Using '^' in the sed call caused a weird failure on
        Solaris 2.6.  Changed it to a ','.  Defined top_builddir.
-       
+
 2001-02-23  Dan Harkless  <wget@harkless.org>
 
        * wget.texi: Corrections, clarifications, and English fixes to
        Alphabetized FTP options by long option name.  Mentioned that
        .listing symlinked to /etc/passwd is not a security hole, but that
        other files could be, so root shouldn't run wget in user dirs.
-       
+
 2001-02-22  Dan Harkless  <wget@harkless.org>
 
        * Makefile.in: Make wget man page and install it if we have
        fails -- fixed call of texi2pod.pl that did this wrong.
 
        * texi2pod.pl: Removed from CVS.  Now automatically generated.
-               
+
        * texi2pod.pl.in: This new file is processed into texi2pod.pl,
        getting the appropriate path to the Perl 5+ executable on this
        system and becoming executable (CVS files, by contrast, don't
        arrive executable).
-       
+
 2001-02-19  Dan Harkless  <wget@harkless.org>
 
        * wget.texi (Download Options): Further improvement to --continue
 
        * wget.texi (Reporting Bugs): Deleted the setence about Cc-ing the
        bug report to Wget mailing list as the bug report address is an
-       alias for the mailing ist anyway.  
+       alias for the mailing ist anyway.
        (Mailing List): Added URL for the alternate archive.
-       
+
        * wget.texi: Bunch of cosmetical changes.
-       
+
        * Makefile.in: Added targets for manpage generation using
        texi2pod.pl and pod2man (comes with Perl5). As we cannot rely on
        Perl5 being available on the system, manpage is not being built
        automatically. Updated '*clean' targets to remove
        'sample.wgetrc.munged...', 'wget.pod', and 'wget.man'.
-       
+
        * texi2pod.pl: New file copied from GCC distribution to facilitate
        automatic manpage generation.
-           
+
 2001-01-09  Dan Harkless  <wget@harkless.org>
 
        * wget.texi (Download Options): Did a bunch of clarification and
        the best way to go about my aim.  Removed them in favor of:
 
        * ChangeLog-branches/1.6_branch.ChangeLog: New file.
-       
+
 2000-12-31  Dan Harkless  <wget@harkless.org>
 
        * Makefile.in (distclean): sample.wgetrc.munged_for_texi_inclusion
        regenerated, forcing people to have makeinfo installed
        unnecessarily.  We could use a kludge of a 0-length file in the
        distro, but the file isn't that big and should compress very well.
-       
+
        * wget.texi: Changed "VERSION 1.5.3+dev" to "VERSION 1.7-dev" and
        "UPDATED Feb 2000" to "UPDATED Dec 2000".  Like the comment in the
        file says, it'd be nice if these were handled automatically...
-       
+
        * ChangeLog: Since this flat file doesn't have multiple branches,
        looking at the dates would make you think that things went into
        1.6 that actually just went into the 1.7-dev branch.  Added "[Not
        * wget.texi (Recursive Retrieval Options): Improved --delete-after docs.
        (Download Options): Documented Rob Mayoff's new --bind-address option.
        (Wgetrc Commands): Documented Rob Mayoff's new bind_address command.
-       
+
 2000-10-20  Dan Harkless  <wget@harkless.org>
 
        * wget.texi (Recursive Retrieval Options): Sugg. -E on 1-page download.
-       
+
 2000-10-19  Dan Harkless  <wget@harkless.org>
 
        * wget.texi (HTTP Options): Documented my new -E / --html-extension.
        John Daily's "quad" values (which I renamed to "lockable
        Boolean").  When I documented Damir Dzeko's --referer, I forgot to
        add the .wgetrc equivalent; mentioned the "referrer" spelling issue.
-       
+
 2000-10-09  Dan Harkless  <wget@harkless.org>
 
        * wget.texi (FTP Options): --retr-symlinks wasn't documented properly.
 
        * wget.texi (Recursive Retrieval Options): Documented new -p option.
        (Wgetrc Commands): Documented -p's equvialent, page_requisites.
-       
+
 2000-08-23  Dan Harkless  <wget@harkless.org>
 
        * wget.texi (Download Options): Using -c on a file that's already fully
        * wget.texi (Logging and Input File Options): -B / --base was not
        documented as a separate item, and the .wgetrc version was misleading.
 
-       * wget.texi (Wgetrc Commands): Changed all instances of 
+       * wget.texi (Wgetrc Commands): Changed all instances of
        ", the same as" to the more grammatical " -- the same as".
 
 2000-08-22  Dan Harkless  <wget@harkless.org>
 2000-04-18  Dan Harkless  <wget@harkless.org>
 
        * sample.wgetrc: Realized I put a global setting in the local section.
-       
+
 2000-04-13  Dan Harkless  <wget@harkless.org>
 
        * Makefile.in (sample.wgetrc.munged_for_texi_inclusion): Added
        build, dependencies, and distclean cleanup of this new file.
-       
+
        * sample.wgetrc: Uncommented waitretry and set it to 10, clarified
        some wording, and re-wrapped some text to 71 columns due to
        @sample indentation in wget.texi.
        times I ran `make install' after changing sample.wgetrc.  Added
        blank lines around the message and a "<Hit RETURN to
        acknowledge>", and reworded the message to be a bit more clear.
-       
+
        * sample.wgetrc: Added entries for backup_converted and waitretry.
 
        * wget.texi (Download Options and Wgetrc Commands): Herold Heiko
index 83894258583c0b06d92754fd146eb2ad9c5d0b04..d5eaf4e5f460b968c59a008ba3baf9f04678697f 100644 (file)
@@ -579,7 +579,8 @@ some cases where this behavior can actually have some use.
 Note that a combination with @samp{-k} is only permitted when
 downloading a single document, as in that case it will just convert
 all relative URIs to external ones; @samp{-k} makes no sense for
-multiple URIs when they're all being downloaded to a single file.
+multiple URIs when they're all being downloaded to a single file;
+@samp{-k} can be used only when the output is a regular file.
 
 @cindex clobbering, file
 @cindex downloading multiple times
index cf478621e9aa2db68491925bb58360cd05afdb4a..a84ff3780ca44c8354be06c9c61f6c609f69dd83 100644 (file)
@@ -1,3 +1,8 @@
+2010-05-27  Giuseppe Scrivano  <gscrivano@gnu.org>
+
+       * main.c (main): Exit with failure when -k is specified and -O is not
+       a regular file.
+
 2010-05-27  Giuseppe Scrivano  <gscrivano@gnu.org>
 
        * http.c (gethttp): Consider new cookies retrieved when the
index 8cacb893f36d74ccba329921c6a94fa7db2abccb..9edec13b67919b4cc942dc3872dc0e39ae6038b7 100644 (file)
@@ -1217,6 +1217,13 @@ WARNING: Can't reopen standard output in binary mode;\n\
           if (fstat (fileno (output_stream), &st) == 0 && S_ISREG (st.st_mode))
             output_stream_regular = true;
         }
+      if (!output_stream_regular && opt.convert_links)
+        {
+          printf (_("-k can be used together with -O only if outputting to \
+a regular file.\n"));
+          print_usage ();
+          exit(1);
+        }
     }
 
 #ifdef __VMS