mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-29 21:08:49 +01:00
🎨 细化云端同步锁提升稳定性 https://github.com/siyuan-note/siyuan/issues/5887
This commit is contained in:
parent
7bc8fba466
commit
90f45a420e
15 changed files with 79 additions and 81 deletions
|
|
@ -141,9 +141,7 @@ func NetImg2LocalAssets(rootID string) (err error) {
|
|||
name = util.FilterFileName(name)
|
||||
name = "net-img-" + name + "-" + ast.NewNodeID() + ext
|
||||
writePath := filepath.Join(util.DataDir, "assets", name)
|
||||
writingDataLock.Lock()
|
||||
defer writingDataLock.Unlock()
|
||||
if err = gulu.File.WriteFileSafer(writePath, data, 0644); nil != err {
|
||||
if err = util.WriteFileSafer(writePath, data); nil != err {
|
||||
logging.LogErrorf("write downloaded net img [%s] to local assets [%s] failed: %s", u, writePath, err)
|
||||
return ast.WalkSkipChildren
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue