mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 17:40:13 +01:00
🎨 配置文件读写不再加锁 https://github.com/siyuan-note/siyuan/issues/5664
This commit is contained in:
parent
b61dfc2a7f
commit
2abcd97262
2 changed files with 10 additions and 10 deletions
|
|
@ -153,7 +153,7 @@ func (box *Box) GetConf() (ret *conf.BoxConf) {
|
|||
return
|
||||
}
|
||||
|
||||
data, err := filelock.LockFileRead(confPath)
|
||||
data, err := filelock.NoLockFileRead(confPath)
|
||||
if nil != err {
|
||||
logging.LogErrorf("read box conf [%s] failed: %s", confPath, err)
|
||||
return
|
||||
|
|
@ -192,7 +192,7 @@ func (box *Box) saveConf0(data []byte) {
|
|||
if err := os.MkdirAll(filepath.Join(util.DataDir, box.ID, ".siyuan"), 0755); nil != err {
|
||||
logging.LogErrorf("save box conf [%s] failed: %s", confPath, err)
|
||||
}
|
||||
if err := filelock.LockFileWrite(confPath, data); nil != err {
|
||||
if err := filelock.NoLockFileWrite(confPath, data); nil != err {
|
||||
logging.LogErrorf("save box conf [%s] failed: %s", confPath, err)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue