diff options
Diffstat (limited to 'apps/files_trashbin/index.php')
-rw-r--r-- | apps/files_trashbin/index.php | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/apps/files_trashbin/index.php b/apps/files_trashbin/index.php index 93f385dd30b..f0c5b0508b8 100644 --- a/apps/files_trashbin/index.php +++ b/apps/files_trashbin/index.php @@ -37,19 +37,18 @@ if ($isIE8 && isset($_GET['dir'])){ $ajaxLoad = false; if (!$isIE8){ - $files = \OCA\Files_Trashbin\Helper::getTrashFiles($dir); + try { + $files = \OCA\Files_Trashbin\Helper::getTrashFiles($dir); + } catch (Exception $e) { + header('Location: ' . OCP\Util::linkTo('files_trashbin', 'index.php')); + exit(); + } } else{ $files = array(); $ajaxLoad = true; } -// Redirect if directory does not exist -if ($files === null){ - header('Location: ' . OCP\Util::linkTo('files_trashbin', 'index.php')); - exit(); -} - $dirlisting = false; if ($dir && $dir !== '/') { $dirlisting = true; |