Skip to content

Commit a00852d

Browse files
kesselbbackportbot[bot]
authored andcommitted
fix: skip caching lastSeenQuotaUsage for remote shares
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de> [skip ci]
1 parent 9cb334c commit a00852d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,7 @@ public function testGetQuotaInfoSpecific(): void {
357357
->willReturnMap([
358358
['\OCA\Files_Sharing\SharedStorage', false],
359359
['\OC\Files\Storage\Wrapper\Quota', true],
360+
[\OCA\Files_Sharing\External\Storage::class, false],
360361
]);
361362

362363
$storage->expects($this->once())

lib/private/legacy/OC_Helper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ public static function getStorageInfo($path, $rootInfo = null, $includeMountPoin
596596
'mountPoint' => trim($mountPoint, '/'),
597597
];
598598

599-
if ($ownerId && $path === '/') {
599+
if ($isRemoteShare === false && $ownerId !== false && $path === '/') {
600600
// If path is root, store this as last known quota usage for this user
601601
\OCP\Server::get(\OCP\IConfig::class)->setUserValue($ownerId, 'files', 'lastSeenQuotaUsage', (string)$relative);
602602
}

0 commit comments

Comments
 (0)