From c1b6f9458a55cdc1143a1ae3959c577004ff8e3f Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Wed, 2 Apr 2008 15:07:20 +0200 Subject: "touch E; mkfifo F; cp -fR F E" no longer fails due to existing E * src/copy.c (copy_internal): Revert change of 2005-03-01, 4303f0454592421eea48be87777d32a49e1d5e5b Prompted by Michael Stone, who pointed me to an old bug report from Ian Jackson: http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/7504 * tests/cp/special-f: New file. Test for the above. * tests/cp/Makefile.am (TESTS): Add special-f. * NEWS: mention this bug fix. --- src/copy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/copy.c b/src/copy.c index 4e38e0021..c2f21a340 100644 --- a/src/copy.c +++ b/src/copy.c @@ -1354,7 +1354,7 @@ copy_internal (char const *src_name, char const *dst_name, && (x->unlink_dest_before_opening || (x->preserve_links && 1 < dst_sb.st_nlink) || (x->dereference == DEREF_NEVER - && S_ISLNK (src_sb.st_mode)) + && ! S_ISREG (src_sb.st_mode)) )) { if (unlink (dst_name) != 0 && errno != ENOENT) -- cgit v1.2.3-70-g09d2