mirror of
https://github.com/nextcloud/server.git
synced 2026-04-20 22:00:39 -04:00
Try create folder first and check if it exists after
Co-authored-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com> Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
This commit is contained in:
parent
5c4e4c5590
commit
77979b1475
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->is_dir($fullPath) && !$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