bug-fileutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

PATCH: cp -r should copy files, not symlinks


From: Chris Bednar
Subject: PATCH: cp -r should copy files, not symlinks
Date: Fri, 28 Dec 2001 00:10:41 -0600 (CST)

On Sat, 1 Dec 2001, Christian Harkort wrote:
>   ... 
> I just want to tell you, that the copy-command cp -r under my linux 
> installation generally makes links instead of copies which I thought it 
>   ... 

    The following patch to fileutils-4.1 seems to fix
a long-standing `cp -r' bug.... without this, cp uses
lstat instead of stat.

----
Chris J. Bednar
Director, Distributed Computing Product Group
http://AdvancedDataSolutions.com/


    ----------------------

--- fileutils-4.1/src/cp.c.deref        Thu Dec 27 23:46:29 2001
+++ fileutils-4.1/src/cp.c      Thu Dec 27 23:51:26 2001
@@ -796,6 +796,7 @@
        case 'r':
          x.recursive = 1;
          x.copy_as_regular = 1;
+         x.dereference =  DEREF_ALWAYS;
          break;
 
        case 'R':





reply via email to

[Prev in Thread] Current Thread [Next in Thread]