invariably unsuccessfully. The more useful behaviour, and also more
intuitive IMO, is to have it create `subdir/dirname' where `dirname'
is the name of the last path component of your cwd.
git-svn-id: svn://svn.tartarus.org/sgt/utils@7720
cda61777-01e9-0310-a592-
d414129be87e
if ($multiple) {
foreach $source (@ARGV) {
+ # We must path-normalise $source _before_ looking for the final
+ # filename component, to deal with the case of `lns . subdir'
+ # in which we want the link to be called subdir/<dirname> rather
+ # than subdir/. .
+ $source = &normalise($source);
$source =~ /^(.*\/)?([^\/]*)$/; # find final file name component
&makelink($source, "$target/$2"); # actually make a link
}