Mail Archives: djgpp-workers/1998/11/02/11:32:06
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 -