summaryrefslogtreecommitdiff
path: root/src/mv.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2000-07-25 12:18:06 +0000
committerJim Meyering <jim@meyering.net>2000-07-25 12:18:06 +0000
commit135a310ca1176f35fa47ce6ec9f83e1cfd8a89c3 (patch)
treef6c325d7a5a686cde1458e8c6c7fc8ef847deb38 /src/mv.c
parent01bd1682597ece19e2abff3eaf391760eb368015 (diff)
downloadcoreutils-135a310ca1176f35fa47ce6ec9f83e1cfd8a89c3.tar.xz
Convert "`%s'" in format strings to "%s", and wrap each
corresponding argument in a `quote (...)' call.
Diffstat (limited to 'src/mv.c')
-rw-r--r--src/mv.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/mv.c b/src/mv.c
index 07f81669c..1e02d7d9b 100644
--- a/src/mv.c
+++ b/src/mv.c
@@ -53,6 +53,7 @@
#include "cp-hash.h"
#include "error.h"
#include "path-concat.h"
+#include "quote.h"
#include "remove.h"
/* The official name of this program (e.g., no `g' prefix). */
@@ -203,8 +204,8 @@ do_move (const char *source, const char *dest, const struct cp_options *x)
dir_to_remove = NULL;
error (0, 0,
- _("cannot move `%s' to a subdirectory of itself, `%s'"),
- source, dest);
+ _("cannot move %s to a subdirectory of itself, %s"),
+ quote_n (0, source), quote_n (0, dest));
}
else if (rename_succeeded)
{
@@ -259,7 +260,7 @@ do_move (const char *source, const char *dest, const struct cp_options *x)
remove_fini ();
if (fail)
- error (0, errno, _("cannot remove `%s'"), dir_to_remove);
+ error (0, errno, _("cannot remove %s"), quote (dir_to_remove));
}
if (copy_into_self)
@@ -482,8 +483,8 @@ main (int argc, char **argv)
{
if (!dest_is_dir)
{
- error (0, 0, _("specified target, `%s' is not a directory"),
- target_directory);
+ error (0, 0, _("specified target, %s is not a directory"),
+ quote (target_directory));
usage (1);
}
}