mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-01 14:28:49 +01:00
🎨 Automatically create notebook conf.json if not found it https://github.com/siyuan-note/siyuan/issues/9647
This commit is contained in:
parent
2299ff1ae7
commit
0658f3bc0e
2 changed files with 29 additions and 16 deletions
|
|
@ -902,7 +902,12 @@ func upgradeUserGuide() {
|
|||
boxConf := conf.NewBoxConf()
|
||||
boxConfPath := filepath.Join(boxDirPath, ".siyuan", "conf.json")
|
||||
if !filelock.IsExist(boxConfPath) {
|
||||
logging.LogWarnf("found a corrupted box [%s]", boxDirPath)
|
||||
logging.LogWarnf("found a corrupted user guide box [%s]", boxDirPath)
|
||||
if removeErr := filelock.Remove(boxDirPath); nil != removeErr {
|
||||
logging.LogErrorf("remove corrupted user guide box [%s] failed: %s", boxDirPath, removeErr)
|
||||
} else {
|
||||
logging.LogInfof("removed corrupted user guide box [%s]", boxDirPath)
|
||||
}
|
||||
continue
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue