mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Merge pull request #53294 from nextcloud/backport/53264/stable30
[stable30] feat: add --unscanned option to files_external:scan
This commit is contained in:
commit
ef17b4e6a8
1 changed files with 14 additions and 1 deletions
|
|
@ -53,6 +53,11 @@ class Scan extends StorageAuthBase {
|
|||
InputOption::VALUE_OPTIONAL,
|
||||
'The path in the storage to scan',
|
||||
''
|
||||
)->addOption(
|
||||
'unscanned',
|
||||
'',
|
||||
InputOption::VALUE_NONE,
|
||||
'only scan files which are marked as not fully scanned'
|
||||
);
|
||||
parent::configure();
|
||||
}
|
||||
|
|
@ -82,7 +87,15 @@ class Scan extends StorageAuthBase {
|
|||
$this->abortIfInterrupted();
|
||||
});
|
||||
|
||||
$scanner->scan($path);
|
||||
if ($input->getOption('unscanned')) {
|
||||
if ($path !== '') {
|
||||
$output->writeln('<error>--unscanned is mutually exclusive with --path</error>');
|
||||
return 1;
|
||||
}
|
||||
$scanner->backgroundScan();
|
||||
} else {
|
||||
$scanner->scan($path);
|
||||
}
|
||||
|
||||
$this->presentStats($output);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue