From 071ceff7e2f1e410f5525a28b34bd90245f82f76 Mon Sep 17 00:00:00 2001 From: Côme Chilliet Date: Thu, 27 Jan 2022 16:33:24 +0100 Subject: Fixes occ user:info when the user never logged in MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- core/Command/User/Info.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'core/Command/User') 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'], -- cgit v1.2.3