Merge pull request #9372 from nextcloud/bugfix/4577
Do not allow folder creation with quota of 0
This commit is contained in:
commit
5484260569
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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'));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue