From 0d1892e5d6270f12704895a2369e8020cbf2cc47 Mon Sep 17 00:00:00 2001 From: Richard Steinmetz Date: Sun, 12 May 2024 11:00:49 +0200 Subject: [PATCH] fix: ignore invalid storages during initial generation Signed-off-by: Richard Steinmetz --- lib/Command/Generate.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/Command/Generate.php b/lib/Command/Generate.php index 240bab1..ce57132 100644 --- a/lib/Command/Generate.php +++ b/lib/Command/Generate.php @@ -34,6 +34,7 @@ use OCP\Files\Folder; use OCP\Files\IRootFolder; use OCP\Files\NotFoundException; +use OCP\Files\StorageInvalidException; use OCP\Files\StorageNotAvailableException; use OCP\IConfig; use OCP\IPreview; @@ -212,10 +213,10 @@ private function parseFolder(Folder $folder, array $noPreviewMountPaths): void { $this->parseFile($node); } } - } catch (StorageNotAvailableException $e) { - $this->output->writeln(sprintf('Storage for folder folder %s is not available: %s', + } catch (StorageNotAvailableException|StorageInvalidException $e) { + $this->output->writeln(sprintf('Storage for folder %s is not available: %s', $folder->getPath(), - $e->getHint() + $e->getMessage(), )); } }