From: Arthur Schiwon Date: Mon, 29 Apr 2019 14:12:01 +0000 (+0200) Subject: take return of mkdir into account, throw exception on failure X-Git-Tag: v17.0.0beta1~515^2~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=009c2dfbd53833882e1c279c96979406be7d8281;p=nextcloud-server.git take return of mkdir into account, throw exception on failure Signed-off-by: Arthur Schiwon --- 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));