Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Vanessa
2026-05-12 12:11:20 +08:00
4 changed files with 489 additions and 441 deletions

View File

@@ -5,6 +5,15 @@
"homepage": "https://b3log.org/siyuan",
"main": "./electron/main.js",
"packageManager": "pnpm@11.0.9",
"pnpm": {
"onlyBuiltDependencies": [
"electron",
"@parcel/watcher",
"electron-winstaller",
"esbuild"
],
"blockExoticSubdeps": false
},
"scripts": {
"lint": "eslint . --fix --cache",
"dev": "webpack --mode development",

907
app/pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +0,0 @@
onlyBuiltDependencies:
- electron
blockExoticSubdeps: false
allowBuilds:
'@parcel/watcher': true
electron: true
electron-winstaller: true
esbuild: true

View File

@@ -30,6 +30,7 @@ import (
"github.com/88250/lute/ast"
"github.com/siyuan-note/filelock"
"github.com/siyuan-note/logging"
"github.com/siyuan-note/siyuan/kernel/cache"
"github.com/siyuan-note/siyuan/kernel/task"
"github.com/siyuan-note/siyuan/kernel/util"
)
@@ -247,6 +248,11 @@ func Mount(boxID string) (alreadyMount bool, err error) {
return
}
// 清除所有缓存,确保重开用户指南时数据是最新的
cache.ClearTreeCache()
cache.ClearDocsIAL()
cache.ClearBlocksIAL()
avDirPath := filepath.Join(util.WorkingDir, "guide", boxID, "storage", "av")
if filelock.IsExist(avDirPath) {
if err = filelock.Copy(avDirPath, filepath.Join(util.DataDir, "storage", "av")); err != nil {