summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2004-03-13 08:09:58 +0000
committerJim Meyering <jim@meyering.net>2004-03-13 08:09:58 +0000
commitca0f9a0a2977d1e973b5c880c4d20727e81ac8b8 (patch)
tree40000751712a4c5cb272c2ee6bb949fc331ce062 /src
parenteffb220c142b0bf7b4d9b3219e5af7805033e915 (diff)
downloadcoreutils-ca0f9a0a2977d1e973b5c880c4d20727e81ac8b8.tar.xz
(do_copy): Tweak wording in a diagnostic.
Suggestion from Karl Berry. Include "quoatearg.h". (do_copy): Use quotearg_colon (not quote) for diagnostics that begin with `"%s:'.
Diffstat (limited to 'src')
-rw-r--r--src/cp.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/cp.c b/src/cp.c
index 739cc5f48..4f2f1b0c0 100644
--- a/src/cp.c
+++ b/src/cp.c
@@ -32,6 +32,7 @@
#include "dirname.h"
#include "path-concat.h"
#include "quote.h"
+#include "quotearg.h"
#include "utimens.h"
#define ASSIGN_BASENAME_STRDUPA(Dest, File_name) \
@@ -532,16 +533,17 @@ do_copy (int n_files, char **file, const char *target_directory,
{
if (target_directory || 1 < n_files)
{
- char const *msg;
if (new_dst)
- msg = N_("%s: specified destination directory does not exist");
+ error (0, 0, _("%s: destination directory does not exist"),
+ quotearg_colon (dest));
else if (target_directory)
- msg = N_("%s: specified target is not a directory");
+ error (0, 0, _("%s: specified target is not a directory"),
+ quotearg_colon (dest));
else /* n_files > 1 */
- msg =
- N_("copying multiple files, but last argument %s is not a directory");
+ error (0, 0,
+ _("copying multiple files, but last argument %s is not a directory"),
+ quote (dest));
- error (0, 0, _(msg), quote (dest));
usage (EXIT_FAILURE);
}
}