summaryrefslogtreecommitdiff
path: root/src/mv.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1998-11-30 02:56:05 +0000
committerJim Meyering <jim@meyering.net>1998-11-30 02:56:05 +0000
commit4dbf57ed78177907470613e0861e825293935b33 (patch)
tree923e052e76347266f73598b25d881ca241403591 /src/mv.c
parent438a33770b574223a9fae683e106e916b5176649 (diff)
downloadcoreutils-4dbf57ed78177907470613e0861e825293935b33.tar.xz
(do_move): Don't arrange to remove DEST in the copied-into-self case.
Diffstat (limited to 'src/mv.c')
-rw-r--r--src/mv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mv.c b/src/mv.c
index cd03b5ab0..d9b110966 100644
--- a/src/mv.c
+++ b/src/mv.c
@@ -195,7 +195,7 @@ do_move (const char *source, const char *dest, const struct cp_options *x)
copied-into-self directory, DEST (`b/b' in the example),
and failing. */
- dir_to_remove = dest;
+ dir_to_remove = NULL;
error (0, 0,
_("cannot move `%s' to a subdirectory of itself, `%s'"),
source, dest);