🎨 细化云端同步锁提升稳定性 https://github.com/siyuan-note/siyuan/issues/5887

This commit is contained in:
Liang Ding 2022-09-18 09:14:34 +08:00
parent 963b409e4e
commit 11e4c88f5a
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
15 changed files with 110 additions and 106 deletions

View file

@ -30,6 +30,7 @@ import (
"github.com/88250/lute/ast"
"github.com/gin-gonic/gin"
"github.com/siyuan-note/logging"
"github.com/siyuan-note/siyuan/kernel/filesys"
"github.com/siyuan-note/siyuan/kernel/model"
"github.com/siyuan-note/siyuan/kernel/util"
)
@ -106,7 +107,7 @@ func extensionCopy(c *gin.Context) {
}
fName = fName + "-" + ast.NewNodeID() + ext
writePath := filepath.Join(assets, fName)
if err = util.WriteFileSafer(writePath, data); nil != err {
if err = filesys.WriteFileSafer(writePath, data); nil != err {
ret.Code = -1
ret.Msg = err.Error()
break