Disallow node library bookmark folder name with / (#1311)

This commit is contained in:
Chenlei Hu
2024-10-25 12:35:53 -04:00
committed by GitHub
parent 25457d31d4
commit 3a4b36fb31

View File

@@ -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('/') +
'/'