Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2013-08-16 17:48:45 +0400
committerRobin Appelman <icewind@owncloud.com>2013-08-16 17:48:45 +0400
commit8f10c9571f96eeaf6dbc2b6fa31071bc5f735b61 (patch)
tree60bd1fe8d98d03d90680fcaffd7614e510d7ea2c /lib/files/storage
parent88cc2ccb3b8ab4bb8a475e82756d8dc13db69b32 (diff)
fix quota wrapper reporting negative free_space, breaking user interface
return 0 instead
Diffstat (limited to 'lib/files/storage')
-rw-r--r--lib/files/storage/wrapper/quota.php2
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)));
}
}
}