jilles 1a724f1dca ln: Allow a trailing slash when creating a link to a directory.
In the 'ln source... directory' synopsis, the basename of each source
determines the name of the created link. Determine this using basename(3)
instead of strrchr(..., '/') which is incorrect if the pathname ends in a
slash.

The patch is somewhat changed to allow for basename(3) implementations that
change the passed pathname, and to fix the -w option's checking also.
The code to compare directory entries only applies to hard links, which
cannot be created to directories using ln.

Example:
  ln -s /etc/defaults/ /tmp
This should create a symlink named defaults.

PR:		121568
Submitted by:	Ighighi
MFC after:	1 week
2010-04-21 21:57:03 +00:00
..
2009-10-15 18:17:29 +00:00
2009-06-23 23:30:56 +00:00
2010-01-13 17:49:35 +00:00
2009-06-23 23:30:56 +00:00
2010-03-04 16:08:01 +00:00
2009-11-02 12:35:38 +00:00
2009-06-23 23:30:56 +00:00
2009-09-04 21:49:37 +00:00
2010-02-15 14:07:40 +00:00
2009-10-15 18:17:29 +00:00