diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-04-22 22:26:05 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-22 22:26:05 +0300 |
commit | b7be8f5c22cfffc29e91ff897a53c840a2c3f754 (patch) | |
tree | 410c540ca104041ca37f0c3c3985df32546538cd /apps | |
parent | fb59875071ca260f97aaef4d8842a3f4140429de (diff) | |
parent | 54ac585bc506105c9842991b5862a676ea7f23fc (diff) |
Merge pull request #32076 from nextcloud/cache-storage-info-failed-share
use and cache root storage info if a share can't be resolved
Diffstat (limited to 'apps')
-rw-r--r-- | apps/dav/lib/Connector/Sabre/Directory.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/dav/lib/Connector/Sabre/Directory.php b/apps/dav/lib/Connector/Sabre/Directory.php index 9e0b89596cd..ed98b5050f8 100644 --- a/apps/dav/lib/Connector/Sabre/Directory.php +++ b/apps/dav/lib/Connector/Sabre/Directory.php @@ -47,6 +47,7 @@ use OCP\Files\NotPermittedException; use OCP\Files\StorageNotAvailableException; use OCP\Lock\ILockingProvider; use OCP\Lock\LockedException; +use Psr\Log\LoggerInterface; use Sabre\DAV\Exception\BadRequest; use Sabre\DAV\Exception\Locked; use Sabre\DAV\Exception\NotFound; @@ -331,6 +332,8 @@ class Directory extends \OCA\DAV\Connector\Sabre\Node implements \Sabre\DAV\ICol * @return array */ public function getQuotaInfo() { + /** @var LoggerInterface $logger */ + $logger = \OC::$server->get(LoggerInterface::class); if ($this->quotaInfo) { return $this->quotaInfo; } @@ -347,10 +350,13 @@ class Directory extends \OCA\DAV\Connector\Sabre\Node implements \Sabre\DAV\ICol ]; return $this->quotaInfo; } catch (\OCP\Files\NotFoundException $e) { + $logger->warning("error while getting quota into", ['exception' => $e]); return [0, 0]; } catch (\OCP\Files\StorageNotAvailableException $e) { + $logger->warning("error while getting quota into", ['exception' => $e]); return [0, 0]; } catch (NotPermittedException $e) { + $logger->warning("error while getting quota into", ['exception' => $e]); return [0, 0]; } } |