use the same cached propfind for free space for dav storage

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2022-03-25 15:24:38 +01:00 committed by Arthur Schiwon
parent cc74bff50c
commit d334f21bd5
No known key found for this signature in database
GPG key ID: 7424F1874854DF23

View file

@ -275,6 +275,7 @@ class DAV extends Common {
'{http://open-collaboration-services.org/ns}share-permissions',
'{DAV:}resourcetype',
'{DAV:}getetag',
'{DAV:}quota-available-bytes',
]
);
$this->statCache->set($path, $response);
@ -428,8 +429,7 @@ class DAV extends Common {
$this->init();
$path = $this->cleanPath($path);
try {
// TODO: cacheable ?
$response = $this->client->propfind($this->encodePath($path), ['{DAV:}quota-available-bytes']);
$response = $this->propfind($path);
if ($response === false) {
return FileInfo::SPACE_UNKNOWN;
}