diff --git a/lib/private/Files/Node/Folder.php b/lib/private/Files/Node/Folder.php index 148dc28318fa5..51b205d545bcb 100644 --- a/lib/private/Files/Node/Folder.php +++ b/lib/private/Files/Node/Folder.php @@ -133,7 +133,7 @@ public function newFolder($path) { $fullPath = $this->getFullPath($path); $nonExisting = new NonExistingFolder($this->root, $this->view, $fullPath); $this->sendHooks(['preWrite', 'preCreate'], [$nonExisting]); - if (!$this->view->mkdir($fullPath)) { + if (!$this->view->mkdir($fullPath) && !$this->view->is_dir($fullPath)) { throw new NotPermittedException('Could not create folder "' . $fullPath . '"'); } $parent = dirname($fullPath) === $this->getPath() ? $this : null;