michael%liz.cs.mun.ca@MITVMA.MIT.EDU (Mike Rendell) (02/26/90)
The diffs I sent regarding linking to directories had two problems
* you could not make a symlink to a directory
* when it said `%s is a directory' it printed the wrong name out
(should have printed the `old' name instead of the `new')
So, here are diffs for my diffs...
*** /tmp/,RCSt1006641 Mon Feb 26 16:14:00 1990
--- ln.c Mon Feb 26 16:10:27 1990
***************
*** 185,197 ****
if (verbose)
printf (" %s -> %s\n", old, new);
! if (isdir(old))
{
/* On bsd systems -f means links to directories are ok, on sysV it
means try to force the link by unlinking the target first.
Go with the sysV method - /etc/link, should be used to link
directories. */
! fprintf (stderr, "%s: %s is a directory\n", program, new);
return 1;
}
else if (force)
--- 185,197 ----
if (verbose)
printf (" %s -> %s\n", old, new);
! if (!symbolic_link && isdir(old))
{
/* On bsd systems -f means links to directories are ok, on sysV it
means try to force the link by unlinking the target first.
Go with the sysV method - /etc/link, should be used to link
directories. */
! fprintf (stderr, "%s: %s is a directory\n", program, old);
return 1;
}
else if (force)
--
Mike Rendell Department of Computer Science
michael@garfield.cs.mun.ca Memorial University of Newfoundland
uunet!garfield!michael St. John's, Nfld., Canada
(709) 737-4550 A1C 5S7