Merge pull request #5945 from nextcloud/stable12_5836
[stable12] Empty search no longer works
This commit is contained in:
commit
bf4283bce8
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue