fix quota wrapper reporting negative free_space, breaking user interface

return 0 instead
This commit is contained in:
Robin Appelman 2013-08-16 15:48:45 +02:00
parent 88cc2ccb3b
commit 8f10c9571f
1 changed files with 1 additions and 1 deletions

View File

@ -48,7 +48,7 @@ class Quota extends Wrapper {
return \OC\Files\SPACE_NOT_COMPUTED;
} else {
$free = $this->storage->free_space($path);
return min($free, ($this->quota - $used));
return min($free, (max($this->quota - $used, 0)));
}
}
}