Merge pull request #5836 from nextcloud/preview_update

Empty search no longer works
This commit is contained in:
Lukas Reschke 2017-07-25 17:08:31 +02:00 committed by GitHub
commit 63676d3b24

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);
}
}
}