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
Have you experienced this issue?
Rate the importance of this bug to you:

 [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

Add a Patch

Pull Requests

Add a Pull Request

History

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