aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Node
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2019-05-28 13:05:20 +0200
committerJulius Härtl <jus@bitgrid.net>2019-05-28 13:06:59 +0200
commit67dd4b018abde6523c283738411590cf85f5308d (patch)
tree8f6231fc86f96cc2ed7114fb67b5db3779ba3b75 /lib/private/Files/Node
parent8b6d8ed4231e0bedf25ee5d088b128e746584d08 (diff)
downloadnextcloud-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/Node')
-rw-r--r--lib/private/Files/Node/Folder.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/private/Files/Node/Folder.php b/lib/private/Files/Node/Folder.php
index ebf67e47a21..1e9088a7c19 100644
--- a/lib/private/Files/Node/Folder.php
+++ b/lib/private/Files/Node/Folder.php
@@ -181,14 +181,15 @@ class Folder extends Node implements \OCP\Files\Folder {
$nonExisting = new NonExistingFile($this->root, $this->view, $fullPath);
$this->root->emit('\OC\Files', 'preWrite', array($nonExisting));
$this->root->emit('\OC\Files', 'preCreate', array($nonExisting));
- $this->view->touch($fullPath);
+ if (!$this->view->touch($fullPath)) {
+ throw new NotPermittedException('Could not create path');
+ }
$node = new File($this->root, $this->view, $fullPath);
$this->root->emit('\OC\Files', 'postWrite', array($node));
$this->root->emit('\OC\Files', 'postCreate', array($node));
return $node;
- } else {
- throw new NotPermittedException('No create permission for path');
}
+ throw new NotPermittedException('No create permission for path');
}
/**