delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/11/02/11:32:06

Date: Mon, 2 Nov 1998 18:30:45 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: DJ Delorie <dj AT delorie DOT com>
cc: djgpp-workers AT delorie DOT com
Subject: Re: lfn for dos
In-Reply-To: <199811021559.KAA16174@indy.delorie.com>
Message-ID: <Pine.SUN.3.91.981102182720.13235E-100000@is>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com

On Mon, 2 Nov 1998, DJ Delorie wrote:

> The LFN opendir call has a matching closedir call; the SFN versions
> don't.  DJGPP's closedir() function doesn't (or at least didn't) call
> the closedir call for LFN.

This seems easy to fix inside `closedir'.  Should I?

> Microsoft apparently works around this problem by auto-closing when
> the last entry is read.

If `readdir' reads the entire directory, we *do* close the handle, since 
`findnext' calls the necessary LFN function when it gets ENMFILE.

The problem, it seems, is when you `opendir', call `readdir' several times, 
and then don't read any more directory entries.  These cases are usually 
rare, but I guess they could happen.

- Raw text -


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