summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2019-04-29 16:12:01 +0200
committerArthur Schiwon <blizzz@arthur-schiwon.de>2019-04-29 16:45:59 +0200
commit009c2dfbd53833882e1c279c96979406be7d8281 (patch)
tree7bf49e70cbafdf01a04ae3191a1d4538da676d20 /lib
parent01410491b982a9ed5fffe1adf63ee8c00f565d5b (diff)
downloadnextcloud-server-009c2dfbd53833882e1c279c96979406be7d8281.tar.gz
nextcloud-server-009c2dfbd53833882e1c279c96979406be7d8281.zip
take return of mkdir into account, throw exception on failure
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Files/Node/Folder.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/private/Files/Node/Folder.php b/lib/private/Files/Node/Folder.php
index a9b443ce52e..ebf67e47a21 100644
--- a/lib/private/Files/Node/Folder.php
+++ b/lib/private/Files/Node/Folder.php
@@ -158,7 +158,9 @@ class Folder extends Node implements \OCP\Files\Folder {
$nonExisting = new NonExistingFolder($this->root, $this->view, $fullPath);
$this->root->emit('\OC\Files', 'preWrite', array($nonExisting));
$this->root->emit('\OC\Files', 'preCreate', array($nonExisting));
- $this->view->mkdir($fullPath);
+ if(!$this->view->mkdir($fullPath)) {
+ throw new NotPermittedException('Could not create folder');
+ }
$node = new Folder($this->root, $this->view, $fullPath);
$this->root->emit('\OC\Files', 'postWrite', array($node));
$this->root->emit('\OC\Files', 'postCreate', array($node));