diff --git a/lib/private/Repair/NC16/CleanupCardDAVPhotoCache.php b/lib/private/Repair/NC16/CleanupCardDAVPhotoCache.php index c9c7b5cf1c..f0e5c2b2a1 100644 --- a/lib/private/Repair/NC16/CleanupCardDAVPhotoCache.php +++ b/lib/private/Repair/NC16/CleanupCardDAVPhotoCache.php @@ -29,6 +29,7 @@ use OCP\IConfig; use OCP\ILogger; use OCP\Migration\IOutput; use OCP\Migration\IRepairStep; +use RuntimeException; /** * Class CleanupCardDAVPhotoCache @@ -65,6 +66,9 @@ class CleanupCardDAVPhotoCache implements IRepairStep { $folders = $this->appData->getDirectoryListing(); } catch (NotFoundException $e) { return; + } catch (RuntimeException $e) { + $this->logger->logException($e, ['message' => 'Failed to fetch directory listing in CleanupCardDAVPhotoCache']); + return; } $folders = array_filter($folders, function (ISimpleFolder $folder) {