This PR was merged into the 2.3 branch.
Discussion
----------
[Finder] Partially revert #17134 to fix a regression
| Q | A
| ------------- | ---
| Branch | 2.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #18013
| License | MIT
| Doc PR | -
Commits
-------
ead1824
[Finder] Partially revert #17134 to fix a regression
This commit is contained in:
commit
15ccef7690
@ -39,11 +39,18 @@ abstract class FilterIterator extends \FilterIterator
|
|||||||
while ($iterator instanceof \OuterIterator) {
|
while ($iterator instanceof \OuterIterator) {
|
||||||
$innerIterator = $iterator->getInnerIterator();
|
$innerIterator = $iterator->getInnerIterator();
|
||||||
|
|
||||||
if ($innerIterator instanceof \FilesystemIterator) {
|
if ($innerIterator instanceof RecursiveDirectoryIterator) {
|
||||||
|
// this condition is necessary for iterators to work properly with non-local filesystems like ftp
|
||||||
|
if ($innerIterator->isRewindable()) {
|
||||||
|
$innerIterator->next();
|
||||||
|
$innerIterator->rewind();
|
||||||
|
}
|
||||||
|
} elseif ($innerIterator instanceof \FilesystemIterator) {
|
||||||
$innerIterator->next();
|
$innerIterator->next();
|
||||||
$innerIterator->rewind();
|
$innerIterator->rewind();
|
||||||
}
|
}
|
||||||
$iterator = $iterator->getInnerIterator();
|
|
||||||
|
$iterator = $innerIterator;
|
||||||
}
|
}
|
||||||
|
|
||||||
parent::rewind();
|
parent::rewind();
|
||||||
|
Reference in New Issue
Block a user