mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
:file: 移除文件锁 https://github.com/siyuan-note/siyuan/issues/6010
This commit is contained in:
parent
56129699b9
commit
69a9713776
38 changed files with 193 additions and 438 deletions
|
|
@ -27,8 +27,8 @@ import (
|
|||
"github.com/88250/gulu"
|
||||
"github.com/88250/lute/ast"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/siyuan-note/filelock"
|
||||
"github.com/siyuan-note/logging"
|
||||
"github.com/siyuan-note/siyuan/kernel/filesys"
|
||||
"github.com/siyuan-note/siyuan/kernel/sql"
|
||||
"github.com/siyuan-note/siyuan/kernel/treenode"
|
||||
"github.com/siyuan-note/siyuan/kernel/util"
|
||||
|
|
@ -95,7 +95,7 @@ func InsertLocalAssets(id string, assetPaths []string, isUpload bool) (succMap m
|
|||
f.Close()
|
||||
return
|
||||
}
|
||||
if err = filesys.WriteFileSaferByReader(writePath, f); nil != err {
|
||||
if err = filelock.WriteFileByReader(writePath, f); nil != err {
|
||||
f.Close()
|
||||
return
|
||||
}
|
||||
|
|
@ -180,7 +180,7 @@ func Upload(c *gin.Context) {
|
|||
f.Close()
|
||||
break
|
||||
}
|
||||
if err = filesys.WriteFileSaferByReader(writePath, f); nil != err {
|
||||
if err = filelock.WriteFileByReader(writePath, f); nil != err {
|
||||
errFiles = append(errFiles, fName)
|
||||
ret.Msg = err.Error()
|
||||
f.Close()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue