]> source.dussan.org Git - nextcloud-server.git/commitdiff
catch the case where files_trashbin/files doesn't exist
authorRobin Appelman <icewind@owncloud.com>
Mon, 24 Mar 2014 11:33:44 +0000 (12:33 +0100)
committerRobin Appelman <icewind@owncloud.com>
Mon, 24 Mar 2014 11:33:44 +0000 (12:33 +0100)
apps/files_trashbin/lib/trashbin.php

index 62879b0ca853b2114a4be78e8afae71bef822346..7b14a4ec0816ddae30f00be3bdb4c5c0101c8239 100644 (file)
@@ -922,8 +922,11 @@ class Trashbin {
 
                $view = new \OC\Files\View('/' . $user . '/files_trashbin');
                $dh = $view->opendir('/files');
+               if (!$dh) {
+                       return false;
+               }
                while ($file = readdir($dh)) {
-                       if($file !== '.' and $file !== '..'){
+                       if ($file !== '.' and $file !== '..') {
                                return false;
                        }
                }