mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-02 14:58:49 +01:00
This commit is contained in:
parent
85fdb0c4b6
commit
5581397aeb
1 changed files with 2 additions and 2 deletions
|
|
@ -1078,13 +1078,13 @@ func getWorkspaceDataConf() (conf *filesys.DataConf, err error) {
|
|||
if !gulu.File.IsExist(confPath) {
|
||||
os.MkdirAll(filepath.Dir(confPath), 0755)
|
||||
data, _ := gulu.JSON.MarshalIndentJSON(conf, "", " ")
|
||||
if err = os.WriteFile(confPath, data, 0644); nil != err {
|
||||
if err = filelock.NoLockFileWrite(confPath, data); nil != err {
|
||||
util.LogErrorf("save sync conf [%s] failed: %s", confPath, err)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
data, err := os.ReadFile(confPath)
|
||||
data, err := filelock.NoLockFileRead(confPath)
|
||||
if nil != err {
|
||||
util.LogErrorf("read sync conf [%s] failed: %s", confPath, err)
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue