diff options
author | Carl Schwan <carl@carlschwan.eu> | 2021-08-19 16:11:30 +0300 |
---|---|---|
committer | Carl Schwan <carl@carlschwan.eu> | 2021-08-19 16:14:07 +0300 |
commit | 2978a4be8eb97cfaf4d681f118e62921ae63d5a5 (patch) | |
tree | 12b6d7f7f4333efb20fb3e808578b61bb4fc02b1 /lib/Command | |
parent | 59c7b53588554e6e5cbcaec3f89e6a54544c6131 (diff) |
Display unsupported messages when trying to scann object store based
group folder
Since the group folder with an object store as primary storage are now
using an NoopScanner, the number of folders and files found is always
zero.
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'lib/Command')
-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; |