mirror of
https://github.com/nextcloud/server.git
synced 2026-06-10 17:23:59 -04:00
Merge pull request #9372 from nextcloud/bugfix/4577
Do not allow folder creation with quota of 0
This commit is contained in:
commit
5484260569
2 changed files with 13 additions and 0 deletions
|
|
@ -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 a new issue