FIX: ADIR() Incorrectly Reports That a File Exists

ID: Q113318

2.50b 3.00b MACINTOSH kbprg kbbuglist

The information in this article applies to:

SYMPTOMS

Under certain rare circumstances, the ADIR() function may erroneously report that a file exists when it does not.

STATUS

Microsoft has confirmed this to be a problem in FoxPro version 2.5b for Macintosh.

MORE INFORMATION

Steps to Reproduce Problem

NOTE: The ADIR() function returns a 0 if the specified file is not found, or a 1 if it is found.

Type the following in the Command window:

   CREATE TABLE test.dbf (name C(20))
   ?FILE('test.dbf')  && Correctly returns .T.
   ?FILE('test.dbf' + CHR(201))  && Correctly returns .F.
   ?ADIR(x, 'test.dbf' + CHR(201))  && Correctly returns 0
   USE
   RENAME 'test.dbf' TO 'test.dbf,.dbf'
   ?FILE('test.dbf,.dbf')  && Correctly returns .T.
   ?FILE('test.dbf,.dbf' + 'X')  && Correctly returns .F.
   ?ADIR(x, 'test.dbf,.dbf' + 'X') && Incorrectly returns 1

NOTE: In the last line above, the ADIR() function returns a 1, indicating that it found a file with the name "test.dbf,.dbfX".

Additional reference words: VFoxMac 3.00b FoxMac 2.50b buglist2.50b buglist3.00b KBCategory: kbprg kbbuglist KBSubcategory:

Keywords          : kbbuglist
Version           : MACINTOSH 2.5b,3.0b
Platform          : MACINTOSH

Last Reviewed: October 29, 1998