Catch NoUserException when running the upload cleanup as cronjob

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2020-04-03 12:17:27 +02:00
parent 2d0f29f208
commit fba7bcfcc4
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}