fix: Shared folder check

Signed-off-by: provokateurin <kate@provokateurin.de>
This commit is contained in:
provokateurin 2024-03-28 09:53:55 +01:00
parent 35d9a456a8
commit 25ad4e6185
No known key found for this signature in database
1 changed files with 4 additions and 3 deletions

View File

@ -168,14 +168,15 @@ class NoteUtil {
$folder = $this->root->newFolder($path);
}
if (!($folder instanceof Folder)) {
throw new NotesFolderException($path.' is not a folder');
}
if ($folder->isShared()) {
$folderName = $this->root->getNonExistingName($path);
$folder = $this->root->newFolder($folderName);
}
if (!($folder instanceof Folder)) {
throw new NotesFolderException($path.' is not a folder');
}
return $folder;
}