From 19324e6342c2263e3145ad39952f0f6e2417597c Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=B4me=20Chilliet?= Date: Thu, 27 Jan 2022 16:33:24 +0100 Subject: [PATCH] Fixes occ user:info when the user never logged in MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- core/Command/User/Info.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/Command/User/Info.php b/core/Command/User/Info.php index abc8938ed54..36bfa0b6d5b 100644 --- a/core/Command/User/Info.php +++ b/core/Command/User/Info.php @@ -97,7 +97,11 @@ class Info extends Base { protected function getStorageInfo(IUser $user): array { \OC_Util::tearDownFS(); \OC_Util::setupFS($user->getUID()); - $storage = \OC_Helper::getStorageInfo('/'); + try { + $storage = \OC_Helper::getStorageInfo('/'); + } catch (\OCP\Files\NotFoundException $e) { + return []; + } return [ 'free' => $storage['free'], 'used' => $storage['used'], -- 2.39.5