freebsd-src/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 Allow creating hard links to symlinks using ln(1). 2009-07-19 17:35:23 +00:00
ln.c ln: Refuse deleting a directory entry by hardlinking it to itself. 2010-04-17 22:39:53 +00:00
Makefile
symlink.7 Expand *n't contractions. 2005-02-13 22:25:33 +00:00