delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2004/12/13/23:50:31

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
Date: Tue, 14 Dec 2004 06:48:41 +0200
From: "Eli Zaretskii" <eliz AT gnu DOT org>
Sender: halo1 AT zahav DOT net DOT il
To: djgpp AT delorie DOT com
Message-ID: <01c4e198$Blat.v2.2.2$548fb800@zahav.net.il>
X-Mailer: emacs 21.3.50 (via feedmail 8 I) and Blat ver 2.2.2
In-reply-to: <20041213104445.MRNE10597.fep11@[212.117.129.234]>
(alexbodn AT 012 DOT net DOT il)
Subject: Re: network files unc under windows xp
References: <20041213104445.MRNE10597.fep11@[212.117.129.234]>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> From: <alexbodn AT 012 DOT net DOT il>
> Date: Mon, 13 Dec 2004 12:48:55 +0200
> 
> 
> i can't argue with your knowledge and experience, but those small and trivial changes made the whole difference for me (under netware and nt file servers), and hopefully may help others too.

Like I said, your changes solve some simple situations, but they could
never work in all situations.  A program that calls `stat', for
example, would most probably fail, because it needs to know the drive
letter.

> in my opinion, the file operation should rather fail than deliberately prepend a drive letter in such inappropriate situation. here we might act on a wrong file.

That would mean bloating every library function that deals with files
with a test for UNCs, something we were reluctant to do.

> in a total failure condition, net use may be called to overcome this problem. in this case, the used drive should be saved for later net use /delete on file close, if impossible to do it right after file opening.

Saved where and by whome?  We are talking about library functions,
which have no persistent memory and no knowledge where do they run.

There's a DOS system call that can help you find the drive for a UNC,
but it requires iterating on all 32 possible drives, so it's very
costly.  And remember, a user can always change the drive mapping
behind our back, by using "net use" dynamically.

- Raw text -


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