Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
$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;