From f9d4584682bf037352d64fb84dfbc2ad1dbf08b6 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Mon, 25 Jan 2021 12:02:14 +0100 Subject: [PATCH] Catch NotFoundException when querying quota Fixes parent folder that becomes inaccessible when it contains a non-existing / broken entry because the quota check made the PROPFIND on parent fail altogether. Signed-off-by: Vincent Petry --- apps/dav/lib/Connector/Sabre/Directory.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/dav/lib/Connector/Sabre/Directory.php b/apps/dav/lib/Connector/Sabre/Directory.php index f2227f701517e..be1fec20ab4b2 100644 --- a/apps/dav/lib/Connector/Sabre/Directory.php +++ b/apps/dav/lib/Connector/Sabre/Directory.php @@ -41,6 +41,7 @@ use OCP\Files\FileInfo; use OCP\Files\ForbiddenException; use OCP\Files\InvalidPathException; +use OCP\Files\NotFoundException; use OCP\Files\StorageNotAvailableException; use OCP\Lock\ILockingProvider; use OCP\Lock\LockedException; @@ -339,6 +340,8 @@ public function getQuotaInfo() { $free ]; return $this->quotaInfo; + } catch (\OCP\Files\NotFoundException $e) { + return [0, 0]; } catch (\OCP\Files\StorageNotAvailableException $e) { return [0, 0]; }