Knowledge Base

FIX: ADIR() Incorrectly Reports That a File Exists

PSS ID Number: Q113318

Article Last Modified on 08-4-2000


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 the Microsoft products listed at the beginning of this article.


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".

(c) Microsoft Corporation 2000, All Rights Reserved. Contributions by Kevin Zollman, Microsoft Corporation.

Additional query words: VFoxMac FoxMac buglist2.50b buglist3.00b akz

Keywords:
Issue Type: kbbug
Technology: kbHWMAC kbOSMAC kbVFPsearch kbAudDeveloper kbFoxproSearch kbFoxPro250bMac kbVFP300bMac