From 8bee9cf8d3bef39d18bf632bfb217bb6a789989a Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Sat, 22 Jul 2017 14:37:55 +0200 Subject: [PATCH] Empty search no longer works Signed-off-by: Roeland Jago Douma --- lib/private/Preview/Watcher.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/private/Preview/Watcher.php b/lib/private/Preview/Watcher.php index 0b87bcda86..8d091b84b0 100644 --- a/lib/private/Preview/Watcher.php +++ b/lib/private/Preview/Watcher.php @@ -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); } } }