mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 14:40:12 +01:00
🎨 搜索资源文件支持跟随 assets 文件夹符号链接 Fix https://github.com/siyuan-note/siyuan/issues/6217
This commit is contained in:
parent
a00e25cd1e
commit
56128b9cb7
3 changed files with 22 additions and 28 deletions
4
kernel/cache/asset.go
vendored
4
kernel/cache/asset.go
vendored
|
|
@ -43,7 +43,7 @@ func LoadAssets() {
|
|||
assetsLock.Lock()
|
||||
defer assetsLock.Unlock()
|
||||
|
||||
assets := filepath.Join(util.DataDir, "assets")
|
||||
assets := util.GetDataAssetsAbsPath()
|
||||
filepath.Walk(assets, func(path string, info fs.FileInfo, err error) error {
|
||||
if nil == info {
|
||||
return err
|
||||
|
|
@ -59,7 +59,7 @@ func LoadAssets() {
|
|||
}
|
||||
|
||||
hName := util.RemoveID(info.Name())
|
||||
path = filepath.ToSlash(strings.TrimPrefix(path, util.DataDir))[1:]
|
||||
path = "assets" + filepath.ToSlash(strings.TrimPrefix(path, assets))
|
||||
Assets[path] = &Asset{
|
||||
HName: hName,
|
||||
Path: path,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue