]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix quota wrapper reporting negative free_space, breaking user interface
authorRobin Appelman <icewind@owncloud.com>
Fri, 16 Aug 2013 13:48:45 +0000 (15:48 +0200)
committerRobin Appelman <icewind@owncloud.com>
Fri, 16 Aug 2013 13:48:45 +0000 (15:48 +0200)
return 0 instead

lib/files/storage/wrapper/quota.php

index bc2d89397604be07f560c42c2be2fdd445f1729c..e2da8cf2e05a396ca1376fcbb56031fa0e72e617 100644 (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)));
                        }
                }
        }