summaryrefslogtreecommitdiff
path: root/src/copy.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1998-09-28 16:15:00 +0000
committerJim Meyering <jim@meyering.net>1998-09-28 16:15:00 +0000
commitb7e1eadbf8777c03f39368d1f604ba40a583fcd4 (patch)
tree0a340841483363bd6e951358e7e876773a90e6da /src/copy.c
parent685d842096329ab309e6f66b05a5344421d4a4ce (diff)
downloadcoreutils-b7e1eadbf8777c03f39368d1f604ba40a583fcd4.tar.xz
(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.
Diffstat (limited to 'src/copy.c')
-rw-r--r--src/copy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/copy.c b/src/copy.c
index 82f29b29d..1784689b6 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. */