BUG: ADIR() Incorrectly Reports That a File Exists

Last reviewed: June 3, 1996
Article ID: Q113318
The information in this article applies to:
  • Microsoft FoxPro for Macintosh, version 2.5b
  • Microsoft Visual FoxPro for Macintosh, version 3.0b

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. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

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:


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: June 3, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.