]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(do_move): Don't arrange to remove DEST in the copied-into-self case.
authorJim Meyering <jim@meyering.net>
Mon, 30 Nov 1998 02:56:05 +0000 (02:56 +0000)
committerJim Meyering <jim@meyering.net>
Mon, 30 Nov 1998 02:56:05 +0000 (02:56 +0000)
src/mv.c

index cd03b5ab02bc7b0e477a1c42f1fed1448d4e87f5..d9b11096633ed5a74777441a3f3cbe3dcdc5dccd 100644 (file)
--- 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);