diff options
author | Jim Meyering <jim@meyering.net> | 2006-09-24 19:28:25 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2006-09-24 19:28:25 +0000 |
commit | e05de760c239c3cdf0fe53889a71f3816b760f22 (patch) | |
tree | 63775732bf1503cc8a775cd0c111741296d24595 /src | |
parent | de88ea4c5db4eaa3488f67c116172ad3fbf98c2f (diff) | |
download | coreutils-e05de760c239c3cdf0fe53889a71f3816b760f22.tar.xz |
* NEWS: Mention these fixes.
* src/copy.c (copy_reg): With --verbose (-v), print
"removed `file_name'" just after unlinking a file.
(copy_internal): Likewise, in three more places.
Marc Lehman reported that "touch x; ln x y; mv -v x y" was silent.
Diffstat (limited to 'src')
-rw-r--r-- | src/copy.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/copy.c b/src/copy.c index c1f374049..2a85578a6 100644 --- a/src/copy.c +++ b/src/copy.c @@ -296,6 +296,8 @@ copy_reg (char const *src_name, char const *dst_name, return_val = false; goto close_src_desc; } + if (x->verbose) + printf (_("removed %s\n"), quote (dst_name)); /* Tell caller that the destination file was unlinked. */ *new_dst = true; @@ -1061,6 +1063,8 @@ copy_internal (char const *src_name, char const *dst_name, doesn't end up removing the source file. */ if (rename_succeeded) *rename_succeeded = true; + if (unlink_src && x->verbose) + printf (_("removed %s\n"), quote (src_name)); return true; } if (unlink_src) @@ -1240,6 +1244,8 @@ copy_internal (char const *src_name, char const *dst_name, return false; } new_dst = true; + if (x->verbose) + printf (_("removed %s\n"), quote (dst_name)); } } } @@ -1344,6 +1350,8 @@ copy_internal (char const *src_name, char const *dst_name, error (0, errno, _("cannot remove %s"), quote (dst_name)); goto un_backup; } + if (x->verbose) + printf (_("removed %s\n"), quote (dst_name)); link_failed = (link (earlier_file, dst_name) != 0); } |