mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-18 04:58:06 +01:00
🎨 Supports cleaning up unreferenced databases https://github.com/siyuan-note/siyuan/issues/11569
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
parent
5c4660f520
commit
7c9acda465
2 changed files with 6 additions and 7 deletions
|
|
@ -46,10 +46,10 @@ import (
|
|||
"github.com/xrash/smetrics"
|
||||
)
|
||||
|
||||
func RemoveUnusedAttributeView(p string) (ret string) {
|
||||
absPath := filepath.Join(util.DataDir, "storage", "av", p+".json")
|
||||
func RemoveUnusedAttributeView(id string) {
|
||||
absPath := filepath.Join(util.DataDir, "storage", "av", id+".json")
|
||||
if !filelock.IsExist(absPath) {
|
||||
return absPath
|
||||
return
|
||||
}
|
||||
|
||||
historyDir, err := GetHistoryDir(HistoryOpClean)
|
||||
|
|
@ -71,7 +71,6 @@ func RemoveUnusedAttributeView(p string) (ret string) {
|
|||
util.PushErrMsg(fmt.Sprintf("%s", err), 7000)
|
||||
return
|
||||
}
|
||||
ret = absPath
|
||||
|
||||
IncSync()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue