]> source.dussan.org Git - nextcloud-server.git/commitdiff
Empty search no longer works 5945/head
authorRoeland Jago Douma <roeland@famdouma.nl>
Sat, 22 Jul 2017 12:37:55 +0000 (14:37 +0200)
committerRoeland Jago Douma <roeland@famdouma.nl>
Tue, 1 Aug 2017 11:29:17 +0000 (13:29 +0200)
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
lib/private/Preview/Watcher.php

index 0b87bcda86e13e2e9df9d72296403bf3987ee3c8..8d091b84b0ec65812075cd0fd1263f2b83353b8a 100644 (file)
@@ -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);
                        }
                }
        }