Merge pull request #32027 from nextcloud/backport/32024/stable24

[stable24] ignore forbidden files while scanning local storage
This commit is contained in:
blizzz 2022-04-22 11:38:04 +02:00 committed by GitHub
commit b9bfd5aba8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -173,7 +173,11 @@ class Local extends \OC\Files\Storage\Common {
* @inheritdoc
*/
public function getMetaData($path) {
$stat = $this->stat($path);
try {
$stat = $this->stat($path);
} catch (ForbiddenException $e) {
return null;
}
if (!$stat) {
return null;
}