freebsd-nq/bin/ln
Jilles Tjoelker 5d66b54e27 ln: Refuse deleting a directory entry by hardlinking it to itself.
Two pathnames refer to the same directory entry iff the directories match
and the final components' names match.

Example: (assuming file1 is an existing file)
  ln -f file1 file1
This now fails while leaving file1 intact. It used to delete file1 and then
complain it cannot be linked because it is gone.

With -i, this error is detected before the question is asked.

MFC after:	2 weeks
2010-04-17 22:39:53 +00:00
..
ln.1
ln.c ln: Refuse deleting a directory entry by hardlinking it to itself. 2010-04-17 22:39:53 +00:00
Makefile
symlink.7