summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2017-07-25 17:08:31 +0200
committerGitHub <noreply@github.com>2017-07-25 17:08:31 +0200
commit63676d3b24a9d60b3961150dee01fcdd30eb4d9c (patch)
tree593b24b406895e9fc1f3c3e7a9c05db2dedf4261 /lib
parent68c4fc25069b580062752a6f55e47d91be57efae (diff)
parent8bee9cf8d3bef39d18bf632bfb217bb6a789989a (diff)
downloadnextcloud-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.php8
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);
}
}
}