From 468d6a9cf1e18e70532dd7d37077d21700d50a83 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Wed, 20 Apr 2022 13:01:16 +0200 Subject: [PATCH] ignore forbidden files while scanning local storage Signed-off-by: Robin Appelman --- lib/private/Files/Storage/Local.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/private/Files/Storage/Local.php b/lib/private/Files/Storage/Local.php index 34ab9a5fc97..d637b3d194f 100644 --- a/lib/private/Files/Storage/Local.php +++ b/lib/private/Files/Storage/Local.php @@ -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; } -- 2.39.5