mirror of
https://github.com/mirror/wget.git
synced 2025-03-13 19:30:20 +08:00
Minor output fix to use quote_n() instead of quote()
* src/ftp.c (ftp_retrieve_list): change quote to quote_n * src/iri.c (do_conversion): change quote to quote_n * src/url.c (convert_fname): change quote to quote_n The implementation quote() reuses the buffer it returns which leads to printing the same string for each quote() call in one output line. Instead, quote_n() should be used as highlighted in the doc: https://www.gnu.org/software/gnulib/manual/html_node/Quoting.html Copyright-paperwork-exempt: Yes
This commit is contained in:
parent
27b12dad12
commit
fd2a061f6a
@ -2352,15 +2352,15 @@ The sizes do not match (local %s) -- retrieving.\n\n"),
|
|||||||
{
|
{
|
||||||
logprintf (LOG_VERBOSE, _("\
|
logprintf (LOG_VERBOSE, _("\
|
||||||
Already have correct symlink %s -> %s\n\n"),
|
Already have correct symlink %s -> %s\n\n"),
|
||||||
quote (con->target),
|
quote_n (0, con->target),
|
||||||
quote (f->linkto));
|
quote_n (1, f->linkto));
|
||||||
dlthis = false;
|
dlthis = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
logprintf (LOG_VERBOSE, _("Creating symlink %s -> %s\n"),
|
logprintf (LOG_VERBOSE, _("Creating symlink %s -> %s\n"),
|
||||||
quote (con->target), quote (f->linkto));
|
quote_n (0, con->target), quote_n (1, f->linkto));
|
||||||
/* Unlink before creating symlink! */
|
/* Unlink before creating symlink! */
|
||||||
unlink (con->target);
|
unlink (con->target);
|
||||||
if (symlink (f->linkto, con->target) == -1)
|
if (symlink (f->linkto, con->target) == -1)
|
||||||
|
@ -138,7 +138,7 @@ do_conversion (const char *tocode, const char *fromcode, char const *in_org, siz
|
|||||||
if (cd == (iconv_t)(-1))
|
if (cd == (iconv_t)(-1))
|
||||||
{
|
{
|
||||||
logprintf (LOG_VERBOSE, _("Conversion from %s to %s isn't supported\n"),
|
logprintf (LOG_VERBOSE, _("Conversion from %s to %s isn't supported\n"),
|
||||||
quote (fromcode), quote (tocode));
|
quote_n (0, fromcode), quote_n (1, tocode));
|
||||||
*out = NULL;
|
*out = NULL;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1585,7 +1585,7 @@ convert_fname (char *fname)
|
|||||||
if (cd == (iconv_t) (-1))
|
if (cd == (iconv_t) (-1))
|
||||||
{
|
{
|
||||||
logprintf (LOG_VERBOSE, _ ("Conversion from %s to %s isn't supported\n"),
|
logprintf (LOG_VERBOSE, _ ("Conversion from %s to %s isn't supported\n"),
|
||||||
quote (from_encoding), quote (to_encoding));
|
quote_n (0, from_encoding), quote_n (1, to_encoding));
|
||||||
return fname;
|
return fname;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user