Ignore forbidden files while scanning
This commit is contained in:
parent
7b1b723e5b
commit
73547f29be
|
@ -38,6 +38,7 @@ use OC\Files\Filesystem;
|
||||||
use OC\Hooks\BasicEmitter;
|
use OC\Hooks\BasicEmitter;
|
||||||
use OCP\Config;
|
use OCP\Config;
|
||||||
use OCP\Files\Cache\IScanner;
|
use OCP\Files\Cache\IScanner;
|
||||||
|
use OCP\Files\ForbiddenException;
|
||||||
use OCP\Files\Storage\ILockingStorage;
|
use OCP\Files\Storage\ILockingStorage;
|
||||||
use OCP\Lock\ILockingProvider;
|
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) {
|
if ($data) {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue