summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Dubiniuk <victor.dubiniuk@gmail.com>2016-02-24 18:08:45 +0300
committerVictor Dubiniuk <victor.dubiniuk@gmail.com>2016-02-26 18:34:15 +0300
commit3285f5e585a1e8a863eb94507c4c45a12e5f48a9 (patch)
tree85a58eb193808d8e0f3103d5c458d99aba2e6b4c
parentbbfc5bbf30a22c268ede1223707e5d50ae9cc4f1 (diff)
downloadnextcloud-server-3285f5e585a1e8a863eb94507c4c45a12e5f48a9.tar.gz
nextcloud-server-3285f5e585a1e8a863eb94507c4c45a12e5f48a9.zip
Skip users with no trashbin
-rw-r--r--apps/files_trashbin/lib/backgroundjob/expiretrash.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/files_trashbin/lib/backgroundjob/expiretrash.php b/apps/files_trashbin/lib/backgroundjob/expiretrash.php
index 079fdd29912..285113a26e0 100644
--- a/apps/files_trashbin/lib/backgroundjob/expiretrash.php
+++ b/apps/files_trashbin/lib/backgroundjob/expiretrash.php
@@ -120,6 +120,12 @@ class ExpireTrash extends \OC\BackgroundJob\TimedJob {
return false;
}
+ //Check if this user has a trashbin directory
+ $view = new \OC\Files\View('/' . $user);
+ if (!$view->is_dir('/files_trashbin/files')){
+ return false;
+ }
+
\OC_Util::tearDownFS();
\OC_Util::setupFS($user);