Skip to content

Commit a5bec1a

Browse files
committed
fix: Avoid conflicts on notes folder creation
Signed-off-by: Julius Härtl <jus@bitgrid.net>
1 parent 395fb08 commit a5bec1a

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

lib/Service/NoteUtil.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,12 @@ public function getOrCreateFolder(string $path, bool $create = true) : Folder {
167167
} elseif ($create) {
168168
$folder = $this->root->newFolder($path);
169169
}
170+
171+
if ($folder->isShared()) {
172+
$folderName = $this->root->getNonExistingName($path);
173+
$folder = $this->root->newFolder($folderName);
174+
}
175+
170176
if (!($folder instanceof Folder)) {
171177
throw new NotesFolderException($path.' is not a folder');
172178
}

0 commit comments

Comments
 (0)