Skip to content

Commit

Permalink
fix: ignore invalid storages during initial generation
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Steinmetz <[email protected]>
  • Loading branch information
st3iny committed May 12, 2024
1 parent 42094d3 commit 0d1892e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/Command/Generate.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -212,10 +213,10 @@ private function parseFolder(Folder $folder, array $noPreviewMountPaths): void {
$this->parseFile($node);
}
}
} catch (StorageNotAvailableException $e) {
$this->output->writeln(sprintf('<error>Storage for folder folder %s is not available: %s</error>',
} catch (StorageNotAvailableException|StorageInvalidException $e) {
$this->output->writeln(sprintf('<error>Storage for folder %s is not available: %s</error>',
$folder->getPath(),
$e->getHint()
$e->getMessage(),
));
}
}
Expand Down

0 comments on commit 0d1892e

Please sign in to comment.