mirror of
https://github.com/nextcloud/server.git
synced 2026-02-18 18:28:50 -05:00
Merge pull request #45413 from nextcloud/createIfNotExists
fix(files): Try to create dir only if it not exists
This commit is contained in:
commit
48e6240502
1 changed files with 1 additions and 1 deletions
|
|
@ -133,7 +133,7 @@ class Folder extends Node implements \OCP\Files\Folder {
|
|||
$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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue