php / php/php-src

RecursiveDirectoryIterator regression wrt. junctions

オープン
#9,674 コメント 3 件 リアクション 0 件 担当者 1 名 GitHub で見る

@cmb69 がすでに取り組んでいます。

2022年10月5日 から。

  • #9774 @cmb69 による — オープン
Bug Extension: spl Status: Verified
主要言語
C
スター
40.4k
フォーク
8.2k
平均マージ
2日 13時間
マージ済み PR(30日)
96

説明

Description

When loading files in $path using

<?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
foreach ($directory as $i) {
    var_dump($i);
}
?>

I can see the symlinked folders. But if I try to load the files using

<?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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。