summaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Storage
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-05-02 22:05:50 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2018-05-03 11:31:23 +0200
commit0ff83f7230a0c16a3ea99390a8e23706adb497c4 (patch)
tree92ef72626abd45653b14bb542ee792630cbd3ec2 /lib/private/Files/Storage
parent2aa108000cd5bb29b7be5d7226185b5c1be59e29 (diff)
downloadnextcloud-server-0ff83f7230a0c16a3ea99390a8e23706adb497c4.tar.gz
nextcloud-server-0ff83f7230a0c16a3ea99390a8e23706adb497c4.zip
Do not allow folder creation with quota of 0
Fixes #4577 Users with a quota of 0 are a special case. Since they can't (ever) create files on their own storage. Therefor it makes no real that they can create folders (and possible share those etc). Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/private/Files/Storage')
-rw-r--r--lib/private/Files/Storage/Wrapper/Quota.php8
1 files changed, 8 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);
+ }
}