diff options
author | Robin Appelman <robin@icewind.nl> | 2018-12-17 00:31:45 +0300 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2018-12-17 00:31:45 +0300 |
commit | 28468268061dc1706da28e1c7a8feb4b8cd7c343 (patch) | |
tree | 6f5947123bc2c817f4c287782348b45cfa910d48 /lib/Command/Scan.php | |
parent | d67e5a165c7f4c7317724f607592b549299d46a8 (diff) |
don't try to call abortIfInterrupted on nc14
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/Command/Scan.php')
-rw-r--r-- | lib/Command/Scan.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/Command/Scan.php b/lib/Command/Scan.php index 05c94b4c..e74be455 100644 --- a/lib/Command/Scan.php +++ b/lib/Command/Scan.php @@ -62,13 +62,19 @@ class Scan extends Base { $scanner->listen('\OC\Files\Cache\Scanner', 'scanFile', function ($path) use ($output) { $output->writeln("\tFile\t<info>$path</info>", OutputInterface::VERBOSITY_VERBOSE); ++$this->filesCounter; - $this->abortIfInterrupted(); + // abortIfInterrupted doesn't exist in nc14 + if(method_exists($this, 'abortIfInterrupted')) { + $this->abortIfInterrupted(); + } }); $scanner->listen('\OC\Files\Cache\Scanner', 'scanFolder', function ($path) use ($output) { $output->writeln("\tFolder\t<info>$path</info>", OutputInterface::VERBOSITY_VERBOSE); ++$this->foldersCounter; - $this->abortIfInterrupted(); + // abortIfInterrupted doesn't exist in nc14 + if(method_exists($this, 'abortIfInterrupted')) { + $this->abortIfInterrupted(); + } }); $start = microtime(true); |