diff --git a/src/stores/nodeBookmarkStore.ts b/src/stores/nodeBookmarkStore.ts index 173d9134f8..47ecf311ca 100644 --- a/src/stores/nodeBookmarkStore.ts +++ b/src/stores/nodeBookmarkStore.ts @@ -115,6 +115,10 @@ export const useNodeBookmarkStore = defineStore('nodeBookmark', () => { throw new Error('Cannot rename non-folder node') } + if (newName.includes('/')) { + throw new Error('Folder name cannot contain "/"') + } + const newNodePath = folderNode.category.split('/').slice(0, -1).concat(newName).join('/') + '/'