🐛 Kernel crash when copy-pasting from some browsers https://github.com/siyuan-note/siyuan/issues/9203

This commit is contained in:
Daniel 2023-09-17 10:39:38 +08:00
parent 9f699aaa32
commit bd4fddce69
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -104,6 +104,11 @@ func html2BlockDOM(c *gin.Context) {
if gulu.OS.IsWindows() {
localPath = strings.TrimPrefix(localPath, "/")
}
if !filepath.IsAbs(localPath) {
// Kernel crash when copy-pasting from some browsers https://github.com/siyuan-note/siyuan/issues/9203
return ast.WalkContinue
}
if !gulu.File.IsExist(localPath) {
return ast.WalkContinue
}