diff options
Diffstat (limited to 'lib/Command/Scan.php')
-rw-r--r-- | lib/Command/Scan.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Command/Scan.php b/lib/Command/Scan.php index 1a7096c1..cc46d55b 100644 --- a/lib/Command/Scan.php +++ b/lib/Command/Scan.php @@ -22,6 +22,7 @@ namespace OCA\GroupFolders\Command; use OC\Core\Command\Base; +use OC\Files\ObjectStore\NoopScanner; use OCA\GroupFolders\Folder\FolderManager; use OCA\GroupFolders\Mount\MountProvider; use OCP\Constants; @@ -60,6 +61,11 @@ class Scan extends Base { $mount = $this->mountProvider->getMount($folder['id'], '/' . $folder['mount_point'], Constants::PERMISSION_ALL, $folder['quota']); $scanner = $mount->getStorage()->getScanner(); + if ($scanner instanceof NoopScanner) { + $output->writeln("Scanning group folders using an object store as primary storage is not supported."); + return -1; + } + $scanner->listen('\OC\Files\Cache\Scanner', 'scanFile', function ($path) use ($output) { $output->writeln("\tFile\t<info>$path</info>", OutputInterface::VERBOSITY_VERBOSE); ++$this->filesCounter; |