aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorGit'Fellow <12234510+solracsf@users.noreply.github.com>2024-05-21 09:38:47 +0200
committerLouis <louis@chmn.me>2024-05-30 14:27:44 +0200
commit5c4e4c55907cad96410ac77547115f03c4adfdd3 (patch)
treed99d3b484d3554a3a2dc5d3e638d682cf5108154 /lib
parent31b0a44cf65b6625636ea0fa15fb1a1122b525e1 (diff)
downloadnextcloud-server-5c4e4c55907cad96410ac77547115f03c4adfdd3.tar.gz
nextcloud-server-5c4e4c55907cad96410ac77547115f03c4adfdd3.zip
fix(files): Try to create dir only if it not exists
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Files/Node/Folder.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Files/Node/Folder.php b/lib/private/Files/Node/Folder.php
index 148dc28318f..091bd3dd0a8 100644
--- a/lib/private/Files/Node/Folder.php
+++ b/lib/private/Files/Node/Folder.php
@@ -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->is_dir($fullPath) && !$this->view->mkdir($fullPath)) {
throw new NotPermittedException('Could not create folder "' . $fullPath . '"');
}
$parent = dirname($fullPath) === $this->getPath() ? $this : null;