🎨 嵌入块纳入引用计数和反链 https://github.com/siyuan-note/siyuan/issues/7096

This commit is contained in:
Liang Ding 2023-01-17 22:16:14 +08:00
parent 6afa767f01
commit 492aabcf22
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
8 changed files with 117 additions and 50 deletions

View file

@ -105,7 +105,7 @@ func ListNotebooks() (ret []*Box, err error) {
continue
}
if !util.IsIDPattern(dir.Name()) {
if !ast.IsNodeIDPattern(dir.Name()) {
continue
}
@ -329,7 +329,7 @@ func (box *Box) Move(oldPath, newPath string) error {
return errors.New(msg)
}
if oldDir := path.Dir(oldPath); util.IsIDPattern(path.Base(oldDir)) {
if oldDir := path.Dir(oldPath); ast.IsNodeIDPattern(path.Base(oldDir)) {
fromDir := filepath.Join(boxLocalPath, oldDir)
if util.IsEmptyDir(fromDir) {
filelock.Remove(fromDir)