Skip to content

Commit

Permalink
fix issue where we'd try and delete something that was already delete…
Browse files Browse the repository at this point in the history
…d due to iterator.
  • Loading branch information
jameslnewell committed Jan 1, 2015
1 parent 6875833 commit 75d11a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/deit/filesystem/Finder.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ public function copyTo($dest) {
public function remove() {
$fs = new Filesystem();

foreach ($this->getIterator() as $srcPath) {
foreach (iterator_to_array($this->getIterator()) as $srcPath) {
$fs->remove($srcPath);
}

Expand Down

0 comments on commit 75d11a8

Please sign in to comment.