diff options
author | Julius Härtl <jus@bitgrid.net> | 2021-01-29 11:26:19 +0100 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2021-01-29 11:26:22 +0100 |
commit | e9ae943bbaeda07724dd52cb238caad015504a6f (patch) | |
tree | a6d2286eaf3da9db6ca5b7da214571ca3b148714 /apps/dav/lib/Connector | |
parent | 6a3321cefeacb977e2832e26e28d72a6223d6b48 (diff) | |
download | nextcloud-server-e9ae943bbaeda07724dd52cb238caad015504a6f.tar.gz nextcloud-server-e9ae943bbaeda07724dd52cb238caad015504a6f.zip |
Properly handle SMB ACL blocking scanning a directory
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 <jus@bitgrid.net>
Diffstat (limited to 'apps/dav/lib/Connector')
-rw-r--r-- | apps/dav/lib/Connector/Sabre/Directory.php | 3 |
1 files changed, 3 insertions, 0 deletions
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]; } } |