aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files
diff options
context:
space:
mode:
authorGit'Fellow <12234510+solracsf@users.noreply.github.com>2024-05-21 09:38:47 +0200
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2024-05-30 18:30:37 +0000
commitfe459f9d7421ecf34892b6db869687e6039e904e (patch)
tree13f8793c8d6265b3e5cc62ac95dd5f1d8328e558 /lib/private/Files
parent3bad1819dd8413922b3d9ceca784d5dcd1b7313f (diff)
downloadnextcloud-server-fe459f9d7421ecf34892b6db869687e6039e904e.tar.gz
nextcloud-server-fe459f9d7421ecf34892b6db869687e6039e904e.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/private/Files')
-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 c7462572fed..d5281e44387 100644
--- a/lib/private/Files/Node/Folder.php
+++ b/lib/private/Files/Node/Folder.php
@@ -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;