Skip to content

Commit 3c24be3

Browse files
committed
bug symfony#51178 [Finder] Revert "Fix children condition in ExcludeDirectoryFilterIterator" (derrabus)
This PR was merged into the 5.4 branch. Discussion ---------- [Finder] Revert "Fix children condition in ExcludeDirectoryFilterIterator" | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix symfony#51162, revert symfony#50885 | License | MIT | Doc PR | not needed This PR reverts symfony#50885 because it did not fix a bug and instead introduced a regression described in symfony#51162. Commits ------- 2fd4453 Revert "minor symfony#50885 [Finder] Fix children condition in ExcludeDirectoryFilterIterator (mvorisek)"
2 parents efff124 + 2fd4453 commit 3c24be3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Finder/Iterator/ExcludeDirectoryFilterIterator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function __construct(\Iterator $iterator, array $directories)
5959
#[\ReturnTypeWillChange]
6060
public function accept()
6161
{
62-
if (isset($this->excludedDirs[$this->getFilename()]) && $this->hasChildren()) {
62+
if ($this->isRecursive && isset($this->excludedDirs[$this->getFilename()]) && $this->isDir()) {
6363
return false;
6464
}
6565

0 commit comments

Comments
 (0)