mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-04 07:48:49 +01:00
🎨 细化云端同步锁提升稳定性 https://github.com/siyuan-note/siyuan/issues/5887
This commit is contained in:
parent
963b409e4e
commit
11e4c88f5a
15 changed files with 110 additions and 106 deletions
|
|
@ -1203,7 +1203,7 @@ func RemoveDoc(boxID, p string) (err error) {
|
|||
|
||||
historyPath := filepath.Join(historyDir, boxID, p)
|
||||
absPath := filepath.Join(util.DataDir, boxID, p)
|
||||
if err = util.Copy(absPath, historyPath); nil != err {
|
||||
if err = filesys.Copy(absPath, historyPath); nil != err {
|
||||
return errors.New(fmt.Sprintf(Conf.Language(70), box.Name, absPath, err))
|
||||
}
|
||||
|
||||
|
|
@ -1534,8 +1534,8 @@ func ChangeFileTreeSort(boxID string, paths []string) {
|
|||
}
|
||||
|
||||
WaitForWritingFiles()
|
||||
util.LockWriteFile()
|
||||
defer util.UnlockWriteFile()
|
||||
filesys.LockWriteFile()
|
||||
defer filesys.UnlockWriteFile()
|
||||
|
||||
box := Conf.Box(boxID)
|
||||
sortIDs := map[string]int{}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue