diff options
author | Robin Appelman <robin@icewind.nl> | 2025-06-02 16:24:30 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2025-06-03 15:15:47 +0200 |
commit | 96fad4d835099341319b29a37363e781b4098f16 (patch) | |
tree | 8854f3f32ec7b6fae0651788ff0311e52f6dab83 | |
parent | 709fa4b7326500ebafcadf565fa37cb7c8ae3440 (diff) | |
download | nextcloud-server-backport/53264/stable30.tar.gz nextcloud-server-backport/53264/stable30.zip |
feat: add --unscanned option to files_external:scanbackport/53264/stable30
Signed-off-by: Robin Appelman <robin@icewind.nl>
-rw-r--r-- | apps/files_external/lib/Command/Scan.php | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/apps/files_external/lib/Command/Scan.php b/apps/files_external/lib/Command/Scan.php index 575ee5989f5..1b0c7c8697e 100644 --- a/apps/files_external/lib/Command/Scan.php +++ b/apps/files_external/lib/Command/Scan.php @@ -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); |