From 1db2efe8056ced5187d3b0e5aa9f6d669b72ff5b Mon Sep 17 00:00:00 2001 From: Julius Härtl Date: Fri, 3 Apr 2020 12:17:27 +0200 Subject: Catch NoUserException when running the upload cleanup as cronjob MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- apps/dav/lib/BackgroundJob/UploadCleanup.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'apps/dav') diff --git a/apps/dav/lib/BackgroundJob/UploadCleanup.php b/apps/dav/lib/BackgroundJob/UploadCleanup.php index 2e6d6edf088..af63c458634 100644 --- a/apps/dav/lib/BackgroundJob/UploadCleanup.php +++ b/apps/dav/lib/BackgroundJob/UploadCleanup.php @@ -26,6 +26,7 @@ declare(strict_types=1); namespace OCA\DAV\BackgroundJob; +use OC\User\NoUserException; use OCP\AppFramework\Utility\ITimeFactory; use OCP\BackgroundJob\IJobList; use OCP\BackgroundJob\TimedJob; @@ -63,7 +64,7 @@ class UploadCleanup extends TimedJob { $uploads = $userRoot->get('uploads'); /** @var Folder $uploadFolder */ $uploadFolder = $uploads->get($folder); - } catch (NotFoundException $e) { + } catch (NotFoundException|NoUserException $e) { $this->jobList->remove(self::class, $argument); return; } -- cgit v1.2.3