From 0810f9289409f54c374bb60da8e0262b64b15417 Mon Sep 17 00:00:00 2001 From: Michael Gapczynski <mtgap@owncloud.com> Date: Thu, 26 Jul 2012 10:30:14 -0400 Subject: [PATCH] Fix used space calculation if shared folder does not exist, fixes bug oc-1331 --- settings/personal.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/settings/personal.php b/settings/personal.php index d82db0d0e7..8ad3af0873 100644 --- a/settings/personal.php +++ b/settings/personal.php @@ -18,7 +18,12 @@ OC_App::setActiveNavigationEntry( 'personal' ); // calculate the disc space $rootInfo=OC_FileCache::get(''); $sharedInfo=OC_FileCache::get('/Shared'); -$used=$rootInfo['size']-$sharedInfo['size']; +if (!isset($sharedInfo)) { + $sharedSize = 0; +} else { + $sharedSize = $sharedInfo['size']; +} +$used=$rootInfo['size']-$sharedSize; $free=OC_Filesystem::free_space(); $total=$free+$used; if($total==0) $total=1; // prevent division by zero -- GitLab