#36365 [Opn->Fbk]: scandir duplicates file name at every 65535th file
| From: | sniper@php.net | Date: | Sat, 11 Feb 2006 12:21:35 +0000 |
| Subject: | #36365 [Opn->Fbk]: scandir duplicates file name at every 65535th file | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-93156@lists.php.net to get a copy of this message | ||
ID: 36365
Updated by: sniper@php.net
Reported By: pilhoon at gmail dot com
-Status: Open
+Status: Feedback
Bug Type: Directory function related
Operating System: windows
PHP Version: 5.1.2
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5.1-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5.1-win32-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2006-02-11 03:17:52] pilhoon at gmail dot com
Description:
------------
scandir duplicates file name at every 65535th file
Reproduce code:
---------------
I made over 260000 files in a folder.
Their names are 'f100001' ... 'f264001'.
$file_names = scandir('files/');
$base_names= array();
for($i=100001; $i<=263064; $i++)
{
$base_names["f".$i] = 0;
}
foreach($file_names as $a_name)
{
if(1 == $base_names[$a_name])
echo $a_name."\n";
else
$base_names[$a_name] = 1;
}
Expected result:
----------------
They must be showed only once.
Actual result:
--------------
scandir(THAT_FOLDER) returns large array but
f165534 and f231069 are duplicated.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=36365&edit=1