Merge pull request #50164 from nextcloud/mountpoint-get-numeric-storage-id-cache

fix: use proper way to get numeric storage id for mountpoint
This commit is contained in:
Robin Appelman 2025-01-14 12:00:04 +01:00 committed by GitHub
commit d4b862e513
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View file

@ -198,7 +198,7 @@ class MountPoint implements IMountPoint {
if (is_null($storage)) {
return -1;
}
$this->numericStorageId = $storage->getStorageCache()->getNumericId();
$this->numericStorageId = $storage->getCache()->getNumericStorageId();
}
return $this->numericStorageId;
}

View file

@ -101,6 +101,8 @@ class UserMountCacheTest extends TestCase {
$cache->expects($this->any())
->method('getId')
->willReturn($rootId);
$cache->method('getNumericStorageId')
->willReturn($storageId);
$storage = $this->getMockBuilder('\OC\Files\Storage\Storage')
->disableOriginalConstructor()