diff options
author | jilles <jilles@FreeBSD.org> | 2010-04-17 22:39:53 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2010-04-17 22:39:53 +0000 |
commit | fd633ce008119f57b9dcf1b829bb499d83bd0976 (patch) | |
tree | 901049f193a870870489a09476f4b77200cfcc09 /usr.bin | |
parent | 3b409255b40aabbe07732cbb576bb30585baa1a3 (diff) | |
download | FreeBSD-src-fd633ce008119f57b9dcf1b829bb499d83bd0976.zip FreeBSD-src-fd633ce008119f57b9dcf1b829bb499d83bd0976.tar.gz |
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
Diffstat (limited to 'usr.bin')
0 files changed, 0 insertions, 0 deletions