summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2017-07-22 14:37:55 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2017-07-24 10:56:21 +0200
commit8bee9cf8d3bef39d18bf632bfb217bb6a789989a (patch)
treeaa0c554073edad7d357c04fca0c5d517ab1e5138 /lib
parent5eee110b15169240134fc54672fe38da63bc7fb1 (diff)
downloadnextcloud-server-8bee9cf8d3bef39d18bf632bfb217bb6a789989a.tar.gz
nextcloud-server-8bee9cf8d3bef39d18bf632bfb217bb6a789989a.zip
Empty search no longer works
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
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);
}
}
}