From e9ae943bbaeda07724dd52cb238caad015504a6f Mon Sep 17 00:00:00 2001 From: Julius Härtl Date: Fri, 29 Jan 2021 11:26:19 +0100 Subject: Properly handle SMB ACL blocking scanning a directory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This makes sure that a possible ForbiddenException is properly passed through the storage as a ForbiddenException and can be catched when trying to fetch the quota info of a parent folder Signed-off-by: Julius Härtl --- apps/dav/lib/Connector/Sabre/Directory.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'apps/dav/lib/Connector') diff --git a/apps/dav/lib/Connector/Sabre/Directory.php b/apps/dav/lib/Connector/Sabre/Directory.php index 990e57eea58..98705c57792 100644 --- a/apps/dav/lib/Connector/Sabre/Directory.php +++ b/apps/dav/lib/Connector/Sabre/Directory.php @@ -41,6 +41,7 @@ use OCA\DAV\Connector\Sabre\Exception\InvalidPath; use OCP\Files\FileInfo; use OCP\Files\ForbiddenException; use OCP\Files\InvalidPathException; +use OCP\Files\NotPermittedException; use OCP\Files\StorageNotAvailableException; use OCP\Lock\ILockingProvider; use OCP\Lock\LockedException; @@ -343,6 +344,8 @@ class Directory extends \OCA\DAV\Connector\Sabre\Node implements \Sabre\DAV\ICol return [0, 0]; } catch (\OCP\Files\StorageNotAvailableException $e) { return [0, 0]; + } catch (NotPermittedException $e) { + return [0, 0]; } } -- cgit v1.2.3