summaryrefslogtreecommitdiffstats
path: root/lib/private/Repair
diff options
context:
space:
mode:
authorDaniel Kesselberg <mail@danielkesselberg.de>2019-05-17 21:04:01 +0200
committerDaniel Kesselberg <mail@danielkesselberg.de>2019-05-17 21:04:01 +0200
commitb693487d64f088969e94ade99cfab8bd3dd7d6b0 (patch)
treea4217840150251bde3233152360b248fe3ad1d1a /lib/private/Repair
parenta3b4410283a0517b458deacc8ee704c12ec028bd (diff)
downloadnextcloud-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.php3
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;
}