diff options
Diffstat (limited to 'apps/dav/lib/Connector/Sabre/Directory.php')
-rw-r--r-- | apps/dav/lib/Connector/Sabre/Directory.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/dav/lib/Connector/Sabre/Directory.php b/apps/dav/lib/Connector/Sabre/Directory.php index 396cfc3417c..531ccff9d92 100644 --- a/apps/dav/lib/Connector/Sabre/Directory.php +++ b/apps/dav/lib/Connector/Sabre/Directory.php @@ -325,8 +325,14 @@ class Directory extends \OCA\DAV\Connector\Sabre\Node implements \Sabre\DAV\ICol if ($this->quotaInfo) { return $this->quotaInfo; } + $relativePath = $this->fileView->getRelativePath($this->info->getPath()); + if ($relativePath === null) { + $logger->warning("error while getting quota as the relative path cannot be found"); + return [0, 0]; + } + try { - $storageInfo = \OC_Helper::getStorageInfo($this->info->getPath(), $this->info, false); + $storageInfo = \OC_Helper::getStorageInfo($relativePath, $this->info, false); if ($storageInfo['quota'] === \OCP\Files\FileInfo::SPACE_UNLIMITED) { $free = \OCP\Files\FileInfo::SPACE_UNLIMITED; } else { |