diff options
author | Robin Appelman <icewind@owncloud.com> | 2014-03-24 12:33:44 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2014-03-24 12:33:44 +0100 |
commit | 6b66b42f6e4399676677bd6f6534ad3c33c8404f (patch) | |
tree | fdf282e8b641517f07caff96aca6b07f756130f8 /apps/files_trashbin/lib | |
parent | 38b1529c2a24a0fc58ce78a444f918750442a8aa (diff) | |
download | nextcloud-server-6b66b42f6e4399676677bd6f6534ad3c33c8404f.tar.gz nextcloud-server-6b66b42f6e4399676677bd6f6534ad3c33c8404f.zip |
catch the case where files_trashbin/files doesn't exist
Diffstat (limited to 'apps/files_trashbin/lib')
-rw-r--r-- | apps/files_trashbin/lib/trashbin.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/files_trashbin/lib/trashbin.php b/apps/files_trashbin/lib/trashbin.php index 62879b0ca85..7b14a4ec081 100644 --- a/apps/files_trashbin/lib/trashbin.php +++ b/apps/files_trashbin/lib/trashbin.php @@ -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; } } |