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>
This commit is contained in:
parent
a3b4410283
commit
b693487d64
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue