Skip to content
Snippets Groups Projects
Commit e6b0eb34 authored by Frank Karlitschek's avatar Frank Karlitschek
Browse files

prevend a division by zero problem

parent 1395e411
No related branches found
No related tags found
No related merge requests found
......@@ -20,6 +20,7 @@ $rootInfo=OC_FileCache::get('');
$used=$rootInfo['size'];
$free=OC_Filesystem::free_space();
$total=$free+$used;
if($total==0) $total=1; // prevent division by zero
$relative=round(($used/$total)*10000)/100;
$email=OC_Preferences::getValue(OC_User::getUser(), 'settings','email','');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment