diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2017-07-25 17:08:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-25 17:08:31 +0200 |
commit | 63676d3b24a9d60b3961150dee01fcdd30eb4d9c (patch) | |
tree | 593b24b406895e9fc1f3c3e7a9c05db2dedf4261 /lib | |
parent | 68c4fc25069b580062752a6f55e47d91be57efae (diff) | |
parent | 8bee9cf8d3bef39d18bf632bfb217bb6a789989a (diff) | |
download | nextcloud-server-63676d3b24a9d60b3961150dee01fcdd30eb4d9c.tar.gz nextcloud-server-63676d3b24a9d60b3961150dee01fcdd30eb4d9c.zip |
Merge pull request #5836 from nextcloud/preview_update
Empty search no longer works
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Preview/Watcher.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/private/Preview/Watcher.php b/lib/private/Preview/Watcher.php index 0b87bcda86e..8d091b84b0e 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); } } } |