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>
use OCP\ILogger;
use OCP\Migration\IOutput;
use OCP\Migration\IRepairStep;
+use RuntimeException;
/**
* Class CleanupCardDAVPhotoCache
private function repair(IOutput $output): void {
try {
$folders = $this->appData->getDirectoryListing();
- } catch (NotFoundException $e) {
+ } catch (NotFoundException|RuntimeException $e) {
return;
}