From: Jim Meyering Date: Sat, 15 Jul 2000 13:29:01 +0000 (+0000) Subject: . X-Git-Tag: FILEUTILS-4_0x~51 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=015bcbb713a553fa8bfa4c0f382f24da8f11ea9e;p=thirdparty%2Fcoreutils.git . --- diff --git a/old/fileutils/ChangeLog b/old/fileutils/ChangeLog index 76bdb964d9..887a4f925d 100644 --- a/old/fileutils/ChangeLog +++ b/old/fileutils/ChangeLog @@ -1,3 +1,45 @@ +2000-07-15 Jim Meyering + + + Begin converting "`%s'" in format strings to "%s", and wrap each + corresponding argument in a `quote (...)' call -- if there's only one. + If there are more than one, then use `quote_n (0, ...), + quote_n (1, ...), ...'. + + Here's the justification, from Paul Eggert (thanks, Paul): + + [Consider] the following, taken from fileutils/copy.c: + + error (0, errno, _("cannot create directory `%s'"), dst_path); + + Now, suppose dst_path is "/'\nrm: removing all files under `/" + (expressed in C string syntax). This will cause the user to see + the following delightfully ambiguous display: + + cp: cannot create directory `/' + rm: removing all files under `/' + + It would be better to rewrite the above line to be something + like this: + + error (0, errno, _("cannot create directory %s"), quote (dst_path)); + + using the definition of "quote" [in lib/quote.c]. That way, + the user will see the following unambiguous display instead: + + cp: cannot create directory `/\'\nrm: removing all files under `/' + + One might object that any user who asks to copy a file with + a weird name like that deserves to get confused. But this + is not a good objection, as the source of the string may not + be under the user's control, or even visible to the user. + + * src/copy.c: Adapt format strings and args as above. Include quote.h. + I have deliberately not changed the output of --verbose. + FIXME: maybe I should. + * src/cp.c: Likewise. + * src/remove.c: Likewise. + 2000-07-13 Paul Eggert * NEWS: Describe --quoting-style=clocale.