[php-src] Issue #9674: RecursiveDirectoryIterator with RecursiveIteratorIterator does not include symlinked folders on windows in PHP 8.1

From: Date: Wed, 05 Oct 2022 07:23:21 +0000
Subject: [php-src] Issue #9674: RecursiveDirectoryIterator with RecursiveIteratorIterator does not include symlinked folders on windows in PHP 8.1
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-242526@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/9674 Author: LHavlicek ### Description When loading files in $path using ```php <?php $directory = new RecursiveDirectoryIterator($path, RecursiveDirectoryIterator::FOLLOW_SYMLINKS); $iterator = new RecursiveIteratorIterator($directory); ?> ``` PHP 8.1 on Windows (Windows 10) does not include files located in a folder that is a symlink (junction). The unread folder is on the same disk and its symlink (junction) is inserted into $path. If I view $directory using ```php <?php foreach ($directory as $i) { var_dump($i); } ?> ``` I can see the symlinked folders. But if I try to load the files using ```php <?php foreach ($iterator as $i) { var_dump($i); } ?> ``` the files located in the symlinked folder are no longer dumped. The files in the actual folders in $path are included. In PHP 8.0 and below, everything is fine and the above code works. Sorry for my English. ### PHP Version PHP 8.1.11 ### Operating System Windows 10

« previous php.bugs (#242526) next »