Sender: rich AT phekda DOT freeserve DOT co DOT uk Message-ID: <3E3A5444.377F597F@phekda.freeserve.co.uk> Date: Fri, 31 Jan 2003 10:47:32 +0000 From: Richard Dawe X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.23 i586) X-Accept-Language: de,fr MIME-Version: 1.0 To: DJGPP workers Subject: Uses of findfirst that eat LFN find handles Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp-workers AT delorie DOT com Hello. Some uses of findfirst will eat LFN find handles. See src/libc/posix/unistd/access.c for an example that doesn't. Guilty files: src/libc/compat/unistd/_irdlink.c src/libc/compat/unistd/xsymlink.c src/libc/posix/glob/glob.c Possibly guilty files: src/libc/posix/sys/stat/lstat.c src/libc/compat/mntent/mntent.c Currently we have snippets of code like this in access.c, to clean up: /* Use _lfn_close_handle so we don't lose a handle. */ if (findfirst(fixed_path, &ff, FA_DIREC) == 0) { if (strcmp(ff.lfn_magic, "LFN32") == 0) _lfn_find_close(ff.lfn_handle); return 0; }