From 009c2dfbd53833882e1c279c96979406be7d8281 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Mon, 29 Apr 2019 16:12:01 +0200 Subject: [PATCH] take return of mkdir into account, throw exception on failure Signed-off-by: Arthur Schiwon --- lib/private/Files/Node/Folder.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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)); -- 2.39.5