From dd510dfe70782fba38d068e9180fe95cf9bf5a5a Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Thu, 1 Sep 2022 17:28:18 +0200 Subject: Allow to mesure free space in object storages, based on used size and quota If the object storage backend doesn't return quota or used bytes information, use a config override for the quota and count the size used in Nextcloud instead. Signed-off-by: Thomas Citharel --- lib/private/Files/ObjectStore/HomeObjectStoreStorage.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/private/Files/ObjectStore/HomeObjectStoreStorage.php') diff --git a/lib/private/Files/ObjectStore/HomeObjectStoreStorage.php b/lib/private/Files/ObjectStore/HomeObjectStoreStorage.php index b361249ff47..4e1f49a351c 100644 --- a/lib/private/Files/ObjectStore/HomeObjectStoreStorage.php +++ b/lib/private/Files/ObjectStore/HomeObjectStoreStorage.php @@ -27,8 +27,9 @@ namespace OC\Files\ObjectStore; use OC\User\User; use OCP\IUser; +use OCP\Files\IHomeStorage; -class HomeObjectStoreStorage extends ObjectStoreStorage implements \OCP\Files\IHomeStorage { +class HomeObjectStoreStorage extends ObjectStoreStorage implements IHomeStorage { /** * The home user storage requires a user object to create a unique storage id * @param array $params @@ -60,7 +61,7 @@ class HomeObjectStoreStorage extends ObjectStoreStorage implements \OCP\Files\IH /** * @param string $path, optional - * @return \OC\User\User + * @return User */ public function getUser($path = null): IUser { return $this->user; -- cgit v1.2.3