Ignore forbidden files while scanning

This commit is contained in:
Robin Appelman 2016-06-01 14:22:12 +02:00 committed by Arthur Schiwon
parent bee918693a
commit ea6921da3b
No known key found for this signature in database
GPG Key ID: 7424F1874854DF23
1 changed files with 6 additions and 1 deletions

View File

@ -38,6 +38,7 @@ use OC\Files\Filesystem;
use OC\Hooks\BasicEmitter;
use OCP\Config;
use OCP\Files\Cache\IScanner;
use OCP\Files\ForbiddenException;
use OCP\Files\Storage\ILockingStorage;
use OCP\Lock\ILockingProvider;
@ -140,7 +141,11 @@ class Scanner extends BasicEmitter implements IScanner {
}
}
$data = $this->getData($file);
try {
$data = $this->getData($file);
} catch (ForbiddenException $e) {
return null;
}
if ($data) {