summaryrefslogtreecommitdiff
path: root/src/mv.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2001-01-10 12:16:52 +0000
committerJim Meyering <jim@meyering.net>2001-01-10 12:16:52 +0000
commit9ea9eed87342fe0e44968ade2c7b316a8fd2eb41 (patch)
treeb49ea0aa1f68187f8ffc7f2c43a615c2fb95ad65 /src/mv.c
parentd882d1d100b3bf4929ea04816fbf2fb988047931 (diff)
downloadcoreutils-9ea9eed87342fe0e44968ade2c7b316a8fd2eb41.tar.xz
(do_move): Remove diagnostic, now that copy.c issues it.
Set `fail' to nonzero in the primary `if (copy_into_self)' block rather than in its own tiny one below.
Diffstat (limited to 'src/mv.c')
-rw-r--r--src/mv.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/mv.c b/src/mv.c
index 4d867565c..262b876df 100644
--- a/src/mv.c
+++ b/src/mv.c
@@ -1,5 +1,5 @@
/* mv -- move or rename files
- Copyright (C) 86, 89, 90, 91, 1995-2000 Free Software Foundation, Inc.
+ Copyright (C) 86, 89, 90, 91, 1995-2001 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -195,9 +195,7 @@ do_move (const char *source, const char *dest, const struct cp_options *x)
and failing. */
dir_to_remove = NULL;
- error (0, 0,
- _("cannot move %s to a subdirectory of itself, %s"),
- quote_n (0, source), quote_n (1, dest));
+ fail = 1;
}
else if (rename_succeeded)
{
@@ -259,9 +257,6 @@ do_move (const char *source, const char *dest, const struct cp_options *x)
if (fail)
error (0, errno, _("cannot remove %s"), quote (dir_to_remove));
}
-
- if (copy_into_self)
- fail = 1;
}
return fail;