FIX: SYS(2014) Function Returns Incorrect Path

Last reviewed: October 29, 1997
Article ID: Q161497
The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, versions 3.0, 3.0b, 5.0

SYMPTOMS

If a file name consists of periods along with the file extension, the SYS(2014) function does not return the correct path. According to the SYS(2014) Help topic, the SYS(2014) function "returns the minimum path relative to the current or specified directory or folder for a specified file."

Note: The word "folder" appears in the Visual FoxPro 3.0 Help file but not in the Visual FoxPro 5.0 Help file.

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem has been fixed in Visual FoxPro 5.0a.

MORE INFORMATION

The SYS(2014) function returns different values depending on the version of Visual FoxPro currently running.

Steps to Reproduce Behavior

  • In Visual FoxPro 3.0b, issue the following commands in the Command window:

          ?SYS(2014,"Samples\Data\........dbf")
          ?SYS(2014,"Samples\Data\employee.dbf")
    

    The following paths appear on the desktop:

          SAMPLES......DBF
          SAMPLES\DATA\EMPLOYEE.DBF
    

-or-
  • In Visual FoxPro 5.0, issue the following commands in the Command window:

          ?SYS(2014,"Samples\Data\........dbf")
          ?SYS(2014,"Samples\Data\employee.dbf")
    

    The following paths appears on the desktop:

          .....DBF
          \VFP5\SAMPLES\DATA\EMPLOYEE.DBF
    

The SYS(2014) function should actually report the following value for the path when a file name consists of period characters:

    \SAMPLES\DATA\........DBF
Keywords          : buglist3.00 buglist3.00b buglist5.00 FxprgGeneral vfoxwin vfpfix5.0a kbbuglist kbfixlist
Version           : 3.0 3.0b 5.0
Platform          : WINDOWS
Issue type        : kbbug
Solution Type     : kbfix


================================================================================


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: October 29, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.