diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2014-02-25 20:46:41 +0100 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2014-03-10 15:13:28 +0100 |
commit | eab844e2267a2955711f9d426c47eedeeea2d479 (patch) | |
tree | 31efab64fb3a949ba4c57ba7c04e75349f7c9d2f /apps/files_trashbin/index.php | |
parent | 9b4af31bac977cb788a6f4a013d32ba0a21437f0 (diff) | |
download | nextcloud-server-eab844e2267a2955711f9d426c47eedeeea2d479.tar.gz nextcloud-server-eab844e2267a2955711f9d426c47eedeeea2d479.zip |
if file is not in db, fall back to restore file to the users root
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; |