From: Jim Meyering Date: Mon, 28 Sep 1998 16:15:00 +0000 (+0000) Subject: (copy_internal): Do honor `n' reply in move-mode. X-Git-Tag: FILEUTILS-4_0-pre1~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b7e1eadbf8777c03f39368d1f604ba40a583fcd4;p=thirdparty%2Fcoreutils.git (copy_internal): Do honor `n' reply in move-mode. Otherwise, `touch a b; echo n|mv -i a b' would remove b. From Bernd Leibing. --- diff --git a/src/copy.c b/src/copy.c index 82f29b29d3..1784689b62 100644 --- a/src/copy.c +++ b/src/copy.c @@ -506,7 +506,7 @@ copy_internal (const char *src_path, const char *dst_path, program_name, dst_path); } if (!yesno ()) - return 0; + return (move_mode ? 1 : 0); } /* In move_mode, DEST may not be an existing directory. */