8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 35666f0 commit ead1824Copy full SHA for ead1824
src/Symfony/Component/Finder/Iterator/FilterIterator.php
@@ -39,11 +39,18 @@ public function rewind()
39
while ($iterator instanceof \OuterIterator) {
40
$innerIterator = $iterator->getInnerIterator();
41
42
- if ($innerIterator instanceof \FilesystemIterator) {
+ if ($innerIterator instanceof RecursiveDirectoryIterator) {
43
+ // this condition is necessary for iterators to work properly with non-local filesystems like ftp
44
+ if ($innerIterator->isRewindable()) {
45
+ $innerIterator->next();
46
+ $innerIterator->rewind();
47
+ }
48
+ } elseif ($innerIterator instanceof \FilesystemIterator) {
49
$innerIterator->next();
50
$innerIterator->rewind();
51
}
- $iterator = $iterator->getInnerIterator();
52
+
53
+ $iterator = $innerIterator;
54
55
56
parent::rewind();
0 commit comments