www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/12/27/09:03:32

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-workers-bounces using -f
From: "Tim Van Holder" <tim DOT van DOT holder AT pandora DOT be>
To: <djgpp-workers AT delorie DOT com>, "'Charles Sandmann'" <sandmann AT clio DOT rice DOT edu>
Subject: RE: lfn from scratch...
Date: Thu, 27 Dec 2001 15:03:26 +0100
Message-ID: <000801c18edf$412e5050$1c7d76d5@zastaixp>
MIME-Version: 1.0
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook, Build 10.0.3416
In-reply-to: <Pine.SUN.3.91.1011227104445.19068F-100000@is>
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Importance: Normal
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

> > I would need to think about this - we would need to 
> recognize UNCs as
> > being driveless and handle specially.  You can't CD to them, just
> > open files, do file I/O
> 
> It is IMHO a bad idea to disallow chdir on UNC directories: some
> applications depend on that.  Important shell scripts, such as
> texi2dvi, and some programs from the TeX-related packages come to
> mind.

Agreed.  A DOS 'cd' is impossible, as that never changes 'drives'.
But an NT 'pushd' is possible.  Since our 'chdir' is supposed to be
Unixy, 'chdir c:/foo' should be more like pushd (i.e. 'c:; cd /foo'),
and so UNCs should be chdir()able.

> It is also a misfeature in general to have a directory which cannot be
> chdir'ed into.  We cannot expect to get away with that.

Well, I suppose we could have stat/fstat not set the 'executable' bit
for
UNC dirs; that indicates you can't chdir into them.

> Perhaps you could look into what Windows programs, such as COMMAND.COM
> or CMD.EXE, do when you type "cd \\cws333\c$\djgpp".

That does nothing (cfr 'cd f:/foo' when you're on c:) with 4NT; cmd.exe
complains that you can't have UNC paths as current directory.
'pushd \\foo\bar' does work though.  cmd.exe maps a temporary drive
letter
to the UNC 'drive' and uses that (so 'pushd \\foo\bar puts you on
V:\ or whatever is available).  A 'popd' then unmaps the drive. 4NT does
the handling internally and just shows the UNC path.  The 4NT behaviour
seems to be the most desirable, but is probably the more complicated of
the two (which is why MS 'wisely' decided not to support it).

- Raw text -


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