Catch NoUserException when running the upload cleanup as cronjob
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
2d0f29f208
commit
fba7bcfcc4
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue