mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-02-28 05:32:52 +00:00
🐛 Kernel crash when copy-pasting from some browsers https://github.com/siyuan-note/siyuan/issues/9203
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user