diff --git a/src/ftp.c b/src/ftp.c index a2f4c3e2..cc0dc734 100644 --- a/src/ftp.c +++ b/src/ftp.c @@ -2036,20 +2036,28 @@ ftp_loop_internal (struct url *u, struct url *original_url, struct fileinfo *f, /* Get the current time string. */ tms = datetime_str (time (NULL)); /* Print fetch message, if opt.verbose. */ - if (opt.verbose) - { - char *hurl = url_string (u, URL_AUTH_HIDE_PASSWD); - char tmp[256]; - strcpy (tmp, " "); - if (count > 1) - sprintf (tmp, _("(try:%2d)"), count); - logprintf (LOG_VERBOSE, "--%s-- %s\n %s => %s\n", - tms, hurl, tmp, quote (locf)); #ifdef WINDOWS - ws_changetitle (hurl); + { + char *hurl = url_string (u, URL_AUTH_HIDE_PASSWD); +#endif + if (opt.verbose) + { + char *hurl = url_string (u, URL_AUTH_HIDE_PASSWD); + char tmp[256]; + strcpy (tmp, " "); + if (count > 1) + sprintf (tmp, _("(try:%2d)"), count); + logprintf (LOG_VERBOSE, "--%s-- %s\n %s => %s\n", + tms, hurl, tmp, quote (locf)); +#ifndef WINDOWS + xfree (hurl); #endif + } +#ifdef WINDOWS + ws_changetitle (hurl); xfree (hurl); - } + } +#endif /* Send getftp the proper length, if fileinfo was provided. */ if (f && f->type != FT_SYMLINK) len = f->size; diff --git a/src/http.c b/src/http.c index a4b5042b..8c1bbf52 100644 --- a/src/http.c +++ b/src/http.c @@ -4388,28 +4388,36 @@ http_loop (struct url *u, struct url *original_url, char **newloc, _("Spider mode enabled. Check if remote file exists.\n")); /* Print fetch message, if opt.verbose. */ - if (opt.verbose) - { - char *hurl = url_string (u, URL_AUTH_HIDE_PASSWD); - - if (count > 1) - { - char tmp[256]; - sprintf (tmp, _("(try:%2d)"), count); - logprintf (LOG_NOTQUIET, "--%s-- %s %s\n", - tms, tmp, hurl); - } - else - { - logprintf (LOG_NOTQUIET, "--%s-- %s\n", - tms, hurl); - } - #ifdef WINDOWS - ws_changetitle (hurl); + { + char *hurl = url_string (u, URL_AUTH_HIDE_PASSWD); +#endif + if (opt.verbose) + { +#ifndef WINDOWS + char *hurl = url_string (u, URL_AUTH_HIDE_PASSWD); #endif + if (count > 1) + { + char tmp[256]; + sprintf (tmp, _("(try:%2d)"), count); + logprintf (LOG_NOTQUIET, "--%s-- %s %s\n", + tms, tmp, hurl); + } + else + { + logprintf (LOG_NOTQUIET, "--%s-- %s\n", + tms, hurl); + } +#ifndef WINDOWS + xfree (hurl); +#endif + } +#ifdef WINDOWS + ws_changetitle (hurl); xfree (hurl); - } + } +#endif /* Default document type is empty. However, if spider mode is on or time-stamping is employed, HEAD_ONLY commands is diff --git a/src/retr.c b/src/retr.c index b84f52c8..6658b9d6 100644 --- a/src/retr.c +++ b/src/retr.c @@ -542,7 +542,7 @@ fd_read_body (const char *downloaded_filename, int fd, FILE *out, wgint toread, if (progress) progress_update (progress, ret, ptimer_read (timer)); #ifdef WINDOWS - if (toread > 0 && opt.show_progress) + if (toread > 0) ws_percenttitle (100.0 * (startpos + sum_read) / (startpos + toread)); #endif