[BusyBox] [PATCH] don't cp a directory into itself

Erik Andersen andersen at codepoet.org
Thu Feb 19 00:44:25 UTC 2004


On Wed Feb 18, 2004 at 06:15:56PM -0600, Chris Larson wrote:
> I was adding -s/--symbolic-link support to busybox cp when I noticed a
> bug with -r/-a.  Test case:
> 
> mkdir -p test/out
> cd test
> busybox cp -a * out/
> 
> Will never return until we run out of open files or similar.
> Coreutils cp on the other hand will error with "cannot copy a directory,
> `out', into itself, `out'".  Patch attached.

Applied,

 -Erik

--
Erik B. Andersen             http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--



More information about the busybox mailing list