PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » File System » VFS » Bug #9975

l

Details

Submitted2007-01-30 05:53 UTC
Fromdichosoelarbol at gmail dot com
StatusClosed
PackageVFS
PHP Version5.2.0
OSDebian GNU/Linux
Roadmaps(Not assigned)

Comments

[2007-01-30 05:53 UTC] dichosoelarbol at gmail dot com

Description:
------------
Function _listFolder() in VFS/sql.php builds a list of contents in some folder you give as a parameter, and writes the results in an associative array ($files[$file['name']] = $file).
This way, if you have a folder and a file with the SAME NAME, the first one that is found is overwritten by the one found later. Conclusion: in the list you get the folder OR the file; never both of them, as I would expect.

Test script:
---------------
$vfs = new VFS_sql($infoarray);

$vfs->write($dirCrear, $fileCrear, null, true);
$vfs->createFolder($dirCrear, $name);

echo "<br><br> listFolder: ";
print_r($vfs->listFolder(''));

Expected result:
----------------
I created a file and a folder with the same name, in the same folder, and I expected to get both of them using this function, but I only got the file or the folder.

Actual result:
--------------
The result is that an item is missing: the file or the folder with the same name.

[2007-01-30 18:10 UTC] mariomop at gmail dot com

l

[2007-01-30 18:12 UTC] dichosoelarbol at gmail dot com

l

[2007-01-30 18:20 UTC] dichosoelarbol at gmail dot com

closed