mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-01 02:10:15 +01:00
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
parent
398ae6fb23
commit
867046ee65
1 changed files with 5 additions and 0 deletions
5
kernel/cache/asset.go
vendored
5
kernel/cache/asset.go
vendored
|
|
@ -54,6 +54,11 @@ func SetAssetHash(hash, path string) {
|
|||
assetHashLock.Lock()
|
||||
defer assetHashLock.Unlock()
|
||||
|
||||
if !strings.HasPrefix(path, "assets/") {
|
||||
logging.LogErrorf("invalid asset path [%s]", path)
|
||||
return
|
||||
}
|
||||
|
||||
assetHashCache[hash] = &AssetHash{Hash: hash, Path: path}
|
||||
assetPathHashCache[path] = &AssetHash{Hash: hash, Path: path}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue