mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-01 18:30:16 +01:00
🎨 使用第三方同步盘时弹出提示并退出内核 https://github.com/siyuan-note/siyuan/issues/7683
This commit is contained in:
parent
d7473b7a6d
commit
5f6d1eac9a
17 changed files with 69 additions and 171 deletions
|
|
@ -259,10 +259,6 @@ func setCriteria(criteria []*Criterion) (err error) {
|
|||
err = filelock.WriteFile(lsPath, data)
|
||||
if nil != err {
|
||||
logging.LogErrorf("write storage [criteria] failed: %s", err)
|
||||
if errors.Is(err, filelock.ErrUnableAccessFile) {
|
||||
os.Exit(logging.ExitCodeFileSysInconsistent)
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
return
|
||||
|
|
@ -278,10 +274,6 @@ func getCriteria() (ret []*Criterion, err error) {
|
|||
data, err := filelock.ReadFile(dataPath)
|
||||
if nil != err {
|
||||
logging.LogErrorf("read storage [criteria] failed: %s", err)
|
||||
if errors.Is(err, filelock.ErrUnableAccessFile) {
|
||||
os.Exit(logging.ExitCodeFileSysInconsistent)
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -353,10 +345,6 @@ func setLocalStorage(val interface{}) (err error) {
|
|||
err = filelock.WriteFile(lsPath, data)
|
||||
if nil != err {
|
||||
logging.LogErrorf("write storage [local] failed: %s", err)
|
||||
if errors.Is(err, filelock.ErrUnableAccessFile) {
|
||||
os.Exit(logging.ExitCodeFileSysInconsistent)
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
return
|
||||
|
|
@ -372,10 +360,6 @@ func getLocalStorage() (ret map[string]interface{}, err error) {
|
|||
data, err := filelock.ReadFile(lsPath)
|
||||
if nil != err {
|
||||
logging.LogErrorf("read storage [local] failed: %s", err)
|
||||
if errors.Is(err, filelock.ErrUnableAccessFile) {
|
||||
os.Exit(logging.ExitCodeFileSysInconsistent)
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue