Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/fulltextsearch.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxence Lange <maxence@pontapreta.net>2016-09-14 19:03:54 +0300
committerGitHub <noreply@github.com>2016-09-14 19:03:54 +0300
commit387a111ff5bc2ab505f1f60dc838aa7b4d4d65c0 (patch)
tree80a3357bd174888d924344b8bc74b74ff1cf57aa
parent25cd458c213970ca65455da0d5405fe58edfa86d (diff)
parente4c4944368be1b33a564ec15570de926fdc37226 (diff)
Merge pull request #16 from daita/0.3.x0.3.1
0.3.1
-rw-r--r--lib/Command/Index.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/Command/Index.php b/lib/Command/Index.php
index 0766d39..209c3b8 100644
--- a/lib/Command/Index.php
+++ b/lib/Command/Index.php
@@ -33,6 +33,7 @@ use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use OCP\IUserManager;
use OC\Files\Filesystem;
+use OC\ForbiddenException;
class Index extends Base
{
@@ -119,7 +120,14 @@ class Index extends Base
Filesystem::init($userId, '');
$this->fileService->setView(Filesystem::getView());
- $scanner->scan($path);
+ try {
+ $scanner->scan($path);
+ } catch (ForbiddenException $e) {
+ // Because we are using the Scanner from Files, let's catch some exception the same way :/
+ $output->writeln('<error>Home storage for user ' . $userId . ' not writable</error>');
+ $output->writeln('Make sure you are running the scan command only as the user the web server runs as');
+ }
+
return array(
'extracted' => $this->filesExtracted,
'total' => $this->filesTotal