summaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/lib
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2015-10-27 12:10:23 +0100
committerRobin Appelman <icewind@owncloud.com>2015-12-11 14:27:37 +0100
commit415cf9278446b4422ef7633d944ca0f3aebcd301 (patch)
tree6509303841b25e7b2b0600f6fbf7ac3bba34589f /apps/files_trashbin/lib
parent4f860b7e0a5284eee90fdd93d6ec733a1559a1eb (diff)
downloadnextcloud-server-415cf9278446b4422ef7633d944ca0f3aebcd301.tar.gz
nextcloud-server-415cf9278446b4422ef7633d944ca0f3aebcd301.zip
Fix thrashbin wrapper when no user is loggedin
Diffstat (limited to 'apps/files_trashbin/lib')
-rw-r--r--apps/files_trashbin/lib/storage.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/files_trashbin/lib/storage.php b/apps/files_trashbin/lib/storage.php
index 0e42df1e967..becde5e635b 100644
--- a/apps/files_trashbin/lib/storage.php
+++ b/apps/files_trashbin/lib/storage.php
@@ -26,6 +26,7 @@ namespace OCA\Files_Trashbin;
use OC\Files\Filesystem;
use OC\Files\Storage\Wrapper\Wrapper;
+use OC\Files\View;
use OCP\IUserManager;
class Storage extends Wrapper {
@@ -151,8 +152,8 @@ class Storage extends Wrapper {
$normalized = Filesystem::normalizePath($this->mountPoint . '/' . $path);
$result = true;
- if (!isset($this->deletedFiles[$normalized])) {
- $view = Filesystem::getView();
+ $view = Filesystem::getView();
+ if (!isset($this->deletedFiles[$normalized]) && $view instanceof View) {
$this->deletedFiles[$normalized] = $normalized;
if ($filesPath = $view->getRelativePath($normalized)) {
$filesPath = trim($filesPath, '/');