delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/12/31/09:56:45

From: <ams AT ludd DOT luth DOT se>
Message-Id: <200212311456.gBVEue817297@speedy.ludd.luth.se>
Subject: Re: fileutils 4.1: ls and symlinks [PATCH]
In-Reply-To: <3E117C37.F40D7EC7@phekda.freeserve.co.uk> "from Richard Dawe at
Dec 31, 2002 11:15:03 am"
To: djgpp-workers AT delorie DOT com
Date: Tue, 31 Dec 2002 15:56:40 +0100 (CET)
X-Mailer: ELM [version 2.4ME+ PL78 (25)]
MIME-Version: 1.0
X-MailScanner: Found to be clean
X-MailScanner-SpamScore: s
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

According to Richard Dawe:
> > > --- gnu.dev/filutil4.1-rel/src/ls.c   2002-10-06 10:33:32.000000000 +0000
> > > +++ gnu.dev/filutil4.1-rel.work/src/ls.c      2002-12-18 16:54:04.000000000 +0000
> > > @@ -2155,6 +2155,13 @@ make_link_path (const char *path, const
> > >    if (linkname == 0)
> > >      return 0;
> > >
> > > +#ifdef MSDOS
> > > +  /* Any filename with a drive specification should be
> > > +   * treated as an absolute pathname on MS-DOS.  */
> > > +  if (linkname[0] && (linkname[1] == ':'))
> > > +    return xstrdup (linkname);
> > > +#endif
> > 
> > Uhoh! That's not true. If in COMMAND.COM I do "a:
> > cd \dos
> > c:
> > cp aaa.tst a:" I think aaa.tst should go into a:/dos not into a:/. At
> > least that's what's been happening to me with some version cp while
> > I've been moving files between computers which doesn't have a network
> > connection.
> 
> I'm not saying c:foo is an absolute path. The code in make_link_path should
> /treat/ it like an absolute path. If the path is relative, it prepends the
> current path. If the path is absolute it leaves it as-is. The case of c:foo we
> have something inbetween, but we treat it as absolute, since we can't prepend
> the current path.

Ah! I think I see. The result is a relative path although treated like
an absolute, which it must be otherwise it wouldn't stay a relative
path. (Oh dear, I'm getting dizzy!)

Then all is right.


Right,

						MartinS

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019