From aac6932e92c82b7362b5772e74a59fa6a10f6a1d Mon Sep 17 00:00:00 2001 From: Victor Dubiniuk Date: Wed, 24 Feb 2016 18:08:45 +0300 Subject: [PATCH] Skip users with no trashbin --- apps/files_trashbin/lib/backgroundjob/expiretrash.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/files_trashbin/lib/backgroundjob/expiretrash.php b/apps/files_trashbin/lib/backgroundjob/expiretrash.php index 7f4f4823918..4ee0658840b 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); -- 2.39.5