bug-fileutils
[Top][All Lists]
Advanced

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

Re: PATCH: cp -r should copy files, not symlinks


From: Jim Meyering
Subject: Re: PATCH: cp -r should copy files, not symlinks
Date: 29 Dec 2001 12:46:13 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1.50

Thanks for the report and patch!
I've applied it and added a test case.

Chris Bednar <address@hidden> writes:
> 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.
...
> --- 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]