mirror of
https://github.com/nextcloud/server.git
synced 2026-06-06 23:34:22 -04:00
Merge pull request #45591 from nextcloud/backport/45413/stable28
[stable28] fix(files): Don't fail if dir exists
This commit is contained in:
commit
d3b5db8176
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->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