diff options
author | Julius Härtl <jus@bitgrid.net> | 2019-05-28 13:05:20 +0200 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2019-05-28 13:06:59 +0200 |
commit | 67dd4b018abde6523c283738411590cf85f5308d (patch) | |
tree | 8f6231fc86f96cc2ed7114fb67b5db3779ba3b75 /lib/private/Files/Storage/Wrapper | |
parent | 8b6d8ed4231e0bedf25ee5d088b128e746584d08 (diff) | |
download | nextcloud-server-67dd4b018abde6523c283738411590cf85f5308d.tar.gz nextcloud-server-67dd4b018abde6523c283738411590cf85f5308d.zip |
Check for free space on touch
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib/private/Files/Storage/Wrapper')
-rw-r--r-- | lib/private/Files/Storage/Wrapper/Quota.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/private/Files/Storage/Wrapper/Quota.php b/lib/private/Files/Storage/Wrapper/Quota.php index 4cbe9189593..492b5aba436 100644 --- a/lib/private/Files/Storage/Wrapper/Quota.php +++ b/lib/private/Files/Storage/Wrapper/Quota.php @@ -209,4 +209,14 @@ class Quota extends Wrapper { return parent::mkdir($path); } + + public function touch($path, $mtime = null) { + $free = $this->free_space($path); + if ($free === 0.0) { + return false; + } + + return parent::touch($path, $mtime); + } + } |