2006-09-24 Jim Meyering <jim@meyering.net>
+ * 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.
* tests/mv/hard-verbose: New file. Test for the above fix.
* tests/mv/Makefile.am (TESTS): Add hard-verbose.
cp -i and mv -i occasionally neglected to prompt when the copy or move
action was bound to fail. This bug dates back to before fileutils-4.0.
+ With --verbose (-v), cp and mv would sometimes generate no output,
+ or neglect to report file removal.
+
* Major changes in release 6.2 (2006-09-18) [stable candidate]
** Changes in behavior
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;
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)
return false;
}
new_dst = true;
+ if (x->verbose)
+ printf (_("removed %s\n"), quote (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);
}