diff options
author | Jim Meyering <meyering@redhat.com> | 2008-04-02 15:07:20 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2008-04-02 18:23:04 +0200 |
commit | c1b6f9458a55cdc1143a1ae3959c577004ff8e3f (patch) | |
tree | b0327fc56e3bbfa959e34b65576895f97f121428 /src | |
parent | f3653f0d204a07d80444c261126360901b849e37 (diff) | |
download | coreutils-c1b6f9458a55cdc1143a1ae3959c577004ff8e3f.tar.xz |
"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.
Diffstat (limited to 'src')
-rw-r--r-- | src/copy.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) |