Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2019-04-29 17:12:01 +0300
committerBackportbot <backportbot-noreply@rullzer.com>2019-04-30 10:27:32 +0300
commitec9c1e2f52fc930c91637cf245481b2792b64478 (patch)
treef47470558c1e4cff77d1eefc33933e061cce2b26
parente0b9a404b164f614985a0c6317a59d92b3105602 (diff)
take return of mkdir into account, throw exception on failure
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
-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));