summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/private/Files/Storage/Wrapper/Quota.php8
-rw-r--r--tests/lib/Files/Storage/Wrapper/QuotaTest.php5
2 files changed, 13 insertions, 0 deletions
diff --git a/lib/private/Files/Storage/Wrapper/Quota.php b/lib/private/Files/Storage/Wrapper/Quota.php
index 22338f9c3cc..4923dcd4d7a 100644
--- a/lib/private/Files/Storage/Wrapper/Quota.php
+++ b/lib/private/Files/Storage/Wrapper/Quota.php
@@ -200,4 +200,12 @@ class Quota extends Wrapper {
return false;
}
}
+
+ public function mkdir($path) {
+ if ($this->quota === 0.0) {
+ return false;
+ }
+
+ return parent::mkdir($path);
+ }
}
diff --git a/tests/lib/Files/Storage/Wrapper/QuotaTest.php b/tests/lib/Files/Storage/Wrapper/QuotaTest.php
index b796e767a7b..546ab69ef6b 100644
--- a/tests/lib/Files/Storage/Wrapper/QuotaTest.php
+++ b/tests/lib/Files/Storage/Wrapper/QuotaTest.php
@@ -208,4 +208,9 @@ class QuotaTest extends \Test\Files\Storage\Storage {
$this->assertTrue($this->instance->instanceOfStorage('\OC\Files\Storage\Wrapper\Wrapper'));
$this->assertTrue($this->instance->instanceOfStorage('\OC\Files\Storage\Wrapper\Quota'));
}
+
+ public function testNoMkdirQuotaZero() {
+ $instance = $this->getLimitedStorage(0.0);
+ $this->assertFalse($instance->mkdir('foobar'));
+ }
}