delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/12/27/11:27:59

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-workers-bounces using -f
Date: Thu, 27 Dec 2001 18:23:51 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Charles Sandmann <sandmann AT clio DOT rice DOT edu>
cc: Tim Van Holder <tim DOT van DOT holder AT pandora DOT be>, djgpp-workers AT delorie DOT com
Subject: Re: UNC examples
In-Reply-To: <10112271619.AA27383@clio.rice.edu>
Message-ID: <Pine.SUN.3.91.1011227181923.22136G-100000@is>
MIME-Version: 1.0
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

On Thu, 27 Dec 2001, Charles Sandmann wrote:

> Yes, we would have to change fixpath.  The drive (st_dev) would just
> be bogus - probably / or \ would be OK.

Beware: some programs do 'A' + st_dev, and expect to come up with a valid 
drive.

> > `ls' converts all 
> > backslashes to forward slashes (see ls-msdos.c in the ported sources), 
> 
> This isn't a problem - for example:
> 
> C:\>dir "//cws333/d$/djgpp"
>  Volume in drive \\cws333\d$ has no label.
>  ...(correct results)
> 
> So Windows is perfectly happy with forward slashes.

I know that, but that's not what I meant (putpath.c will mirror the 
slashes back to backslashes anyway).  What I think happens is this:

  - ls-msdos.c converts the UNC to //cws333/d$/djgpp
  - putpath collapses the leading // into a /
  - we then feed Windows with /cws333/d$/djgpp or \cws333\d$\djgpp, which 
    is something very different

> It's interesting - if you ask cmd.exe for the "drive" of a UNC bat file
> it gives you "\\" instead of "D:"  (a bug, should give entire share ...)

Why do you expect CMD to be devoid of bugs that we didn't find a way to 
solve? ;-)

- Raw text -


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