mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-24 02:20: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
|
|
@ -36,11 +36,9 @@ import (
|
|||
"github.com/siyuan-note/dejavu/entity"
|
||||
"github.com/siyuan-note/encryption"
|
||||
"github.com/siyuan-note/eventbus"
|
||||
"github.com/siyuan-note/filelock"
|
||||
"github.com/siyuan-note/httpclient"
|
||||
"github.com/siyuan-note/logging"
|
||||
"github.com/siyuan-note/siyuan/kernel/cache"
|
||||
"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"
|
||||
|
|
@ -222,11 +220,8 @@ func CheckoutRepo(id string) (err error) {
|
|||
}
|
||||
|
||||
util.PushEndlessProgress(Conf.Language(63))
|
||||
filesys.LockWriteFile()
|
||||
defer filesys.UnlockWriteFile()
|
||||
WaitForWritingFiles()
|
||||
sql.WaitForWritingDatabase()
|
||||
filelock.ReleaseAllFileLocks()
|
||||
CloseWatchAssets()
|
||||
defer WatchAssets()
|
||||
|
||||
|
|
@ -451,7 +446,6 @@ func IndexRepo(memo string) (err error) {
|
|||
start := time.Now()
|
||||
latest, _ := repo.Latest()
|
||||
WaitForWritingFiles()
|
||||
filelock.ReleaseAllFileLocks()
|
||||
index, err := repo.Index(memo, map[string]interface{}{
|
||||
eventbus.CtxPushMsg: eventbus.CtxPushMsgToStatusBarAndProgress,
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue