mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-03 03:07:01 +00:00
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
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}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user