diff options
-rw-r--r-- | apps/files_trashbin/lib/trashbin.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/apps/files_trashbin/lib/trashbin.php b/apps/files_trashbin/lib/trashbin.php index dc38c339ecb..62879b0ca85 100644 --- a/apps/files_trashbin/lib/trashbin.php +++ b/apps/files_trashbin/lib/trashbin.php @@ -922,9 +922,12 @@ class Trashbin { $view = new \OC\Files\View('/' . $user . '/files_trashbin'); $dh = $view->opendir('/files'); - readdir($dh); //'..' - readdir($dh); //'.' - return readdir($dh) === false; + while ($file = readdir($dh)) { + if($file !== '.' and $file !== '..'){ + return false; + } + } + return true; } public static function preview_icon($path) { |