php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #81031 DirectoryIterator show duplicate listing on mergerfs
Submitted: 2021-05-11 22:35 UTC Modified: 2024-01-04 20:32 UTC
From: wowkise at gmail dot com Assigned:
Status: Open Package: SPL related
PHP Version: Irrelevant OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: wowkise at gmail dot com
New email:
PHP Version: OS:

 

 [2021-05-11 22:35 UTC] wowkise at gmail dot com
Description:
------------
Using DirectoryIterator on path that uses mergerfs[1] as underlying fs system causes the returned results to be duplicated.

Using other file system related scan function does not show the same problems. i.e. scandir works perfectly.

1: https://github.com/trapexit/mergerfs

Test script:
---------------
php -r 'foreach( new DirectoryIterator('/path/to/mergerfs') as $it) echo $it->getFilename().PHP_EOL;'

Expected result:
----------------
dir1
dir2
dir3


Actual result:
--------------
dir1
dir2
dir3
dir1
dir2
dir3

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2024-01-04 20:32 UTC] bukka@php.net
-Package: *Directory/Filesystem functions +Package: SPL related
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 01 19:01:37 2025 UTC