diff options
author | Michael Gapczynski <mtgap@owncloud.com> | 2012-07-26 10:30:14 -0400 |
---|---|---|
committer | Michael Gapczynski <mtgap@owncloud.com> | 2012-07-26 10:30:33 -0400 |
commit | 0810f9289409f54c374bb60da8e0262b64b15417 (patch) | |
tree | f0598b2b996ec5b07e0c1cf5f5b77d7855c8ac8a /settings/personal.php | |
parent | 6c92a85d49822dba180fe949d211db60c5b40d51 (diff) | |
download | nextcloud-server-0810f9289409f54c374bb60da8e0262b64b15417.tar.gz nextcloud-server-0810f9289409f54c374bb60da8e0262b64b15417.zip |
Fix used space calculation if shared folder does not exist, fixes bug oc-1331
Diffstat (limited to 'settings/personal.php')
-rw-r--r-- | settings/personal.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/settings/personal.php b/settings/personal.php index d82db0d0e7e..8ad3af08734 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 |