diff options
author | Daniel Kesselberg <mail@danielkesselberg.de> | 2019-05-17 21:04:01 +0200 |
---|---|---|
committer | Daniel Kesselberg <mail@danielkesselberg.de> | 2019-05-17 21:04:01 +0200 |
commit | b693487d64f088969e94ade99cfab8bd3dd7d6b0 (patch) | |
tree | a4217840150251bde3233152360b248fe3ad1d1a /lib/private/Repair | |
parent | a3b4410283a0517b458deacc8ee704c12ec028bd (diff) | |
download | nextcloud-server-b693487d64f088969e94ade99cfab8bd3dd7d6b0.tar.gz nextcloud-server-b693487d64f088969e94ade99cfab8bd3dd7d6b0.zip |
Add catch for RuntimeException
getDirectoryListing can throw a NotFoundException or a RuntimeException.
The repair step should be skipped if the cache directory is missing so
a catch for both exceptions is required.
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Diffstat (limited to 'lib/private/Repair')
-rw-r--r-- | lib/private/Repair/NC16/CleanupCardDAVPhotoCache.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/Repair/NC16/CleanupCardDAVPhotoCache.php b/lib/private/Repair/NC16/CleanupCardDAVPhotoCache.php index c9c7b5cf1c0..92ffcb54742 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 @@ -63,7 +64,7 @@ class CleanupCardDAVPhotoCache implements IRepairStep { private function repair(IOutput $output): void { try { $folders = $this->appData->getDirectoryListing(); - } catch (NotFoundException $e) { + } catch (NotFoundException|RuntimeException $e) { return; } |