Microsoft KB Archive/190461

= BUG: ADIR with V Attribute May Return Empty String =

Article ID: 190461

Article Last Modified on 12/11/1999

-

APPLIES TO


 * Microsoft Visual FoxPro 5.0 Standard Edition
 * Microsoft Visual FoxPro 5.0a

-



This article was previously published under Q190461



SYMPTOMS
If the current Visual FoxPro default directory is not the root directory, when you execute the ADIR command with the V attribute, which is intended to return the volume label of the drive containing the directory passed to the ADIRfunction, ADIR populates the destination array with an empty string, rather than the correct volume label.



STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This has been corrected in Visual FoxPro 6.0.



Steps to Reproduce Behavior
  Run the following code from a program (.prg) file: LOCAL lcCurDir, ax[1] CLEAR lcCurdir = SET('DEFAULT')+CURDIR CD "c:\program files" =ADIR(aX,"c:\","DV") ?1, aX[1] CD c:\ =ADIR(aX,"c:","DV") ?2, aX[1] CD (lcCurDir) 

The first ADIR command sets the value of aX[1] to "". The second ADIR command sets the value of aX[1] to.

