From 4b19979c60accfa7925dcd7315f12cca23f0b563 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Thu, 8 Feb 2024 17:11:20 +0800 Subject: [PATCH] :memo: Add user guide chapter Database https://github.com/siyuan-note/siyuan/issues/10340 --- .../storage/av/20240208163918-rxu3llx.json | 1 + kernel/model/mount.go | 5 +++++ 2 files changed, 6 insertions(+) create mode 100644 app/guide/20210808180117-czj9bvb/storage/av/20240208163918-rxu3llx.json diff --git a/app/guide/20210808180117-czj9bvb/storage/av/20240208163918-rxu3llx.json b/app/guide/20210808180117-czj9bvb/storage/av/20240208163918-rxu3llx.json new file mode 100644 index 000000000..981f56f41 --- /dev/null +++ b/app/guide/20210808180117-czj9bvb/storage/av/20240208163918-rxu3llx.json @@ -0,0 +1 @@ +{"spec":0,"id":"20240208163918-rxu3llx","name":"账单","keyValues":[{"key":{"id":"20240208163918-odyw3i7","name":"成员","type":"block","icon":"","numberFormat":"","template":""},"values":[{"id":"20240208163921-wnf3fqx","keyID":"20240208163918-odyw3i7","blockID":"20240208163920-51nyfyp","type":"block","isDetached":true,"block":{"id":"20240208163920-51nyfyp","content":"Daniel","created":1707381561387,"updated":1707381900674}},{"id":"20240208164408-fwrlt7q","keyID":"20240208163918-odyw3i7","blockID":"20240208164407-q5jgzt1","type":"block","isDetached":true,"block":{"id":"20240208164407-q5jgzt1","content":"Vanessa","created":1707381848145,"updated":1707381890239}}]},{"key":{"id":"20240208164200-aoez2h2","name":"餐饮","type":"number","icon":"","numberFormat":"","template":""},"values":[{"id":"20240208164415-frgrrdi","keyID":"20240208164200-aoez2h2","blockID":"20240208164407-q5jgzt1","type":"number","number":{"content":200,"isNotEmpty":true,"format":"","formattedContent":""}},{"id":"20240208164450-ssb7h5h","keyID":"20240208164200-aoez2h2","blockID":"20240208163920-51nyfyp","type":"number","number":{"content":100,"isNotEmpty":true,"format":"","formattedContent":""}}]},{"key":{"id":"20240208164420-mwu0h5t","name":"服装","type":"number","icon":"","numberFormat":"","template":""},"values":[{"id":"20240208164441-woggrha","keyID":"20240208164420-mwu0h5t","blockID":"20240208164407-q5jgzt1","type":"number","number":{"content":200,"isNotEmpty":true,"format":"","formattedContent":""}},{"id":"20240208164457-fzglttu","keyID":"20240208164420-mwu0h5t","blockID":"20240208163920-51nyfyp","type":"number","number":{"content":100,"isNotEmpty":true,"format":"","formattedContent":""}}]},{"key":{"id":"20240208164505-39qizr5","name":"模板","type":"template","icon":"","numberFormat":"","template":".action{ addf .餐饮 .服装 }"}}],"viewID":"20240208163918-47rg4d7","views":[{"id":"20240208163918-47rg4d7","icon":"","name":"表格","type":"table","table":{"spec":0,"id":"20240208163918-o93ff8j","columns":[{"id":"20240208163918-odyw3i7","wrap":false,"hidden":false,"pin":false,"width":"152px"},{"id":"20240208164200-aoez2h2","wrap":false,"hidden":false,"pin":false,"width":"97px"},{"id":"20240208164420-mwu0h5t","wrap":false,"hidden":false,"pin":false,"width":"126px"},{"id":"20240208164505-39qizr5","wrap":false,"hidden":false,"pin":false,"width":"129px"}],"rowIds":["20240208164407-q5jgzt1","20240208163920-51nyfyp"],"filters":[],"sorts":[],"pageSize":50}}]} \ No newline at end of file diff --git a/kernel/model/mount.go b/kernel/model/mount.go index 04fabe4df..c7b8f942e 100644 --- a/kernel/model/mount.go +++ b/kernel/model/mount.go @@ -164,6 +164,11 @@ func Mount(boxID string) (alreadyMount bool, err error) { return } + avDirPath := filepath.Join(util.WorkingDir, "guide", boxID, "storage", "av") + if err = filelock.Copy(avDirPath, filepath.Join(util.DataDir, "storage", "av")); nil != err { + return + } + if box := Conf.Box(boxID); nil != box { boxConf := box.GetConf() boxConf.Closed = true