From fba7bcfcc42bb2f032f2e4c5559fc57353fd43f8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Julius=20H=C3=A4rtl?= Date: Fri, 3 Apr 2020 12:17:27 +0200 Subject: [PATCH] Catch NoUserException when running the upload cleanup as cronjob MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- apps/dav/lib/BackgroundJob/UploadCleanup.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/dav/lib/BackgroundJob/UploadCleanup.php b/apps/dav/lib/BackgroundJob/UploadCleanup.php index 484d0b4d79b..cd88ed4ab1e 100644 --- a/apps/dav/lib/BackgroundJob/UploadCleanup.php +++ b/apps/dav/lib/BackgroundJob/UploadCleanup.php @@ -27,6 +27,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; } -- 2.39.5