-
Notifications
You must be signed in to change notification settings - Fork 7.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RecursiveDirectoryIterator regression wrt. junctions #9674
Comments
Thanks for reporting! The regression has been introduced by commit f323baa, where the change to |
Junctions are not symlinks; they are more like hardlinks, but still different. If you want to create symlinked folders on Windows, use |
If we `lstat()` a junction on Windows, it is not `S_ISLNK()`, but we still must not assume that it is not a link (in the broadest sense). In lack of a proper way to detect that, we use the fact that `.st_mode` is zero in this case.
Hi. This bug has been causing me some headaches recently because composer only uses junctions on Windows for path based repositories and I have a third party CMS that uses RecursiveDirectoryIterator to scan those directories (without success). Not sure if this is usual for PHP, but the above fix was added a year ago and nothing has happened since. Many thanks! |
Description
When loading files in $path using
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
I can see the symlinked folders. But if I try to load the files using
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
The text was updated successfully, but these errors were encountered: