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(),
));
}
}