diff options
author | Robin Appelman <icewind@owncloud.com> | 2013-08-16 15:48:45 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2013-08-16 15:48:45 +0200 |
commit | 8f10c9571f96eeaf6dbc2b6fa31071bc5f735b61 (patch) | |
tree | 60bd1fe8d98d03d90680fcaffd7614e510d7ea2c | |
parent | 88cc2ccb3b8ab4bb8a475e82756d8dc13db69b32 (diff) | |
download | nextcloud-server-8f10c9571f96eeaf6dbc2b6fa31071bc5f735b61.tar.gz nextcloud-server-8f10c9571f96eeaf6dbc2b6fa31071bc5f735b61.zip |
fix quota wrapper reporting negative free_space, breaking user interface
return 0 instead
-rw-r--r-- | lib/files/storage/wrapper/quota.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/files/storage/wrapper/quota.php b/lib/files/storage/wrapper/quota.php index bc2d8939760..e2da8cf2e05 100644 --- a/lib/files/storage/wrapper/quota.php +++ b/lib/files/storage/wrapper/quota.php @@ -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))); } } } |