Hi all,
I am using coreutils-5.93 and I have the following problem:
Consider the following hierarchy:
mkdir:
file
src:
dir1:
cp1 -> ../../mydir
dir2:
cp2 -> ../../mydir
Now, I want to use
cp -R -L src dest
which fails with the following message:
cp: will not create hard link `dest/src/dir2/cp2' to directory
`dest/src/dir1/cp1'
I have looked at the sources and discovered the "optimizations" around
hard links :-), which helped me understand the problem.
The issue is in copy.c:copy_internal(), because when trying to copy
src/dir2/cp2, earlier_file is not NULL.
This is because XSTAT replies that src/dir2/cp2 is a directory (because
of -L) and obviously it is the same as the one pointed to by src/dir1/cp1.
Is this a bug, or am I missing an options to achieve what I want (ie
have 2 copies of mydir in dest/dir1/cp1 and dest/dir2/cp2) ?
Thanks,
Christophe.
_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils