Merge pull request #5945 from nextcloud/stable12_5836

[stable12] Empty search no longer works
This commit is contained in:
Morris Jobke 2017-08-08 10:41:05 +02:00 committed by GitHub
commit bf4283bce8
1 changed files with 7 additions and 1 deletions

View File

@ -77,10 +77,16 @@ class Watcher {
}
/** @var Folder $node */
$nodes = $node->search('');
$this->deleteFolder($node);
}
private function deleteFolder(Folder $folder) {
$nodes = $folder->getDirectoryListing();
foreach ($nodes as $node) {
if ($node instanceof File) {
$this->toDelete[] = $node->getId();
} else if ($node instanceof Folder) {
$this->deleteFolder($node);
}
}
}