diff options
author | blizzz <blizzz@arthur-schiwon.de> | 2022-04-14 13:39:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-14 13:39:47 +0200 |
commit | ee9ac5bcfb10a5d58a13b3780b695ecf2777bff8 (patch) | |
tree | f69bd3391e464dc223413c03caf43e1cb0409870 /apps | |
parent | eee279de787b7f03c46cee2666d5f8fd1c29fb74 (diff) | |
parent | 3da45428b6585bcc3019f2a2f296a23aa1ed6323 (diff) | |
download | nextcloud-server-ee9ac5bcfb10a5d58a13b3780b695ecf2777bff8.tar.gz nextcloud-server-ee9ac5bcfb10a5d58a13b3780b695ecf2777bff8.zip |
Merge pull request #31836 from nextcloud/backport/31734/stable23
[stable23] dont re-query fileinfo when getting dav quota
Diffstat (limited to 'apps')
-rw-r--r-- | apps/dav/lib/Connector/Sabre/Directory.php | 3 | ||||
-rw-r--r-- | apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php | 8 |
2 files changed, 1 insertions, 10 deletions
diff --git a/apps/dav/lib/Connector/Sabre/Directory.php b/apps/dav/lib/Connector/Sabre/Directory.php index 3ae4416d363..bd92b3b22a4 100644 --- a/apps/dav/lib/Connector/Sabre/Directory.php +++ b/apps/dav/lib/Connector/Sabre/Directory.php @@ -327,8 +327,7 @@ class Directory extends \OCA\DAV\Connector\Sabre\Node implements \Sabre\DAV\ICol return $this->quotaInfo; } try { - $info = $this->fileView->getFileInfo($this->path, false); - $storageInfo = \OC_Helper::getStorageInfo($this->info->getPath(), $info); + $storageInfo = \OC_Helper::getStorageInfo($this->info->getPath(), $this->info, false); if ($storageInfo['quota'] === \OCP\Files\FileInfo::SPACE_UNLIMITED) { $free = \OCP\Files\FileInfo::SPACE_UNLIMITED; } else { diff --git a/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php b/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php index 024a6432d01..c88d2302bec 100644 --- a/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php @@ -299,10 +299,6 @@ class DirectoryTest extends \Test\TestCase { ->method('getMountPoint') ->willReturn($mountPoint); - $this->view->expects($this->once()) - ->method('getFileInfo') - ->willReturn($this->info); - $mountPoint->method('getMountPoint') ->willReturn('/user/files/mymountpoint'); @@ -344,10 +340,6 @@ class DirectoryTest extends \Test\TestCase { $mountPoint->method('getMountPoint') ->willReturn('/user/files/mymountpoint'); - $this->view->expects($this->once()) - ->method('getFileInfo') - ->willReturn($this->info); - $dir = new Directory($this->view, $this->info); $this->assertEquals([200, 800], $dir->getQuotaInfo()); //200 used, 800 free } |