From 57a7ebef9311f18be9983c90355afc5c15ca843d Mon Sep 17 00:00:00 2001 From: Steven Schubiger Date: Fri, 27 Feb 2009 21:22:29 +0100 Subject: [PATCH] Improve also messages when writing a document retrieved via FTP to stdout (#20520). --- src/ChangeLog | 6 ++++++ src/ftp.c | 13 +++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 59c60980..05b56e8c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2009-02-27 Steven Schubiger + + * ftp.c (ftp_loop_internal): Don't claim for FTP retrievals + when writing to standard output either that the document + has been saved. Addresses bug #20520 again. + 2009-02-21 Steven Schubiger * http.c (http_loop): When a document is written to diff --git a/src/ftp.c b/src/ftp.c index e4b90189..8015a3e8 100644 --- a/src/ftp.c +++ b/src/ftp.c @@ -1275,8 +1275,17 @@ ftp_loop_internal (struct url *u, struct fileinfo *f, ccon *con) con->csock = -1; } if (!opt.spider) - logprintf (LOG_VERBOSE, _("%s (%s) - %s saved [%s]\n\n"), - tms, tmrate, quote (locf), number_to_static_string (len)); + { + bool write_to_stdout = (opt.output_document && HYPHENP (opt.output_document)); + + logprintf (LOG_VERBOSE, + write_to_stdout + ? _("%s (%s) - written to stdout %s[%s]\n\n") + : _("%s (%s) - %s saved [%s]\n\n"), + tms, tmrate, + write_to_stdout ? "" : quote (locf), + number_to_static_string (len)); + } if (!opt.verbose && !opt.quiet) { /* Need to hide the password from the URL. The `if' is here -- 2.39.2