🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.utils.bug
Article #1755

Problem with previous fix for fileutils-1.0/ln.c (+fix)

#1755
From: Mike Rendell
Date: Mon, 26 Feb 1990 14:17
43 lines
2077 bytes
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
Technical Details
Message-ID: <9002261947.AA06694@liz>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!MITVMA.MIT.EDU!michael%liz.cs.mun.ca

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!MITVMA.MIT.EDU!michael%liz.cs.mun.ca
From: michael%liz.cs.mun.ca@MITVMA.MIT.EDU (Mike Rendell)
Newsgroups: gnu.utils.bug
Subject: Problem with previous fix for fileutils-1.0/ln.c (+fix)
Message-ID: <9002261947.AA06694@liz>
Date: 26 Feb 90 14:17:37 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 43