mirror of
https://github.com/nextcloud/server.git
synced 2026-06-06 23:34:22 -04:00
fix(files): Try to create dir only if it not exists
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
This commit is contained in:
parent
3bad1819dd
commit
fe459f9d74
1 changed files with 1 additions and 1 deletions
|
|
@ -158,7 +158,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->is_dir($fullPath) && !$this->view->mkdir($fullPath)) {
|
||||
throw new NotPermittedException('Could not create folder "' . $fullPath . '"');
|
||||
}
|
||||
$parent = dirname($fullPath) === $this->getPath() ? $this : null;
|
||||
|
|
|
|||
Loading…
Reference in a new issue