mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-17 22:25:29 +01:00
This commit is contained in:
parent
b2bcec6ea0
commit
effb602c62
9 changed files with 31 additions and 322 deletions
|
|
@ -85,7 +85,7 @@ func ListNotebooks() (ret []*Box, err error) {
|
|||
boxConf := conf.NewBoxConf()
|
||||
boxConfPath := filepath.Join(util.DataDir, dir.Name(), ".siyuan", "conf.json")
|
||||
if !gulu.File.IsExist(boxConfPath) {
|
||||
if isUserGuide(dir.Name()) {
|
||||
if IsUserGuide(dir.Name()) {
|
||||
filelock.ReleaseAllFileLocks()
|
||||
os.RemoveAll(filepath.Join(util.DataDir, dir.Name()))
|
||||
logging.LogWarnf("not found user guid box conf [%s], removed it", boxConfPath)
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ func RemoveBox(boxID string) (err error) {
|
|||
}
|
||||
|
||||
filelock.ReleaseFileLocks(localPath)
|
||||
if !isUserGuide(boxID) {
|
||||
if !IsUserGuide(boxID) {
|
||||
var historyDir string
|
||||
historyDir, err = util.GetHistoryDir("delete")
|
||||
if nil != err {
|
||||
|
|
@ -148,7 +148,7 @@ func Mount(boxID string) (alreadyMount bool, err error) {
|
|||
localPath := filepath.Join(util.DataDir, boxID)
|
||||
|
||||
var reMountGuide bool
|
||||
if isUserGuide(boxID) {
|
||||
if IsUserGuide(boxID) {
|
||||
// 重新挂载帮助文档
|
||||
|
||||
guideBox := Conf.Box(boxID)
|
||||
|
|
@ -214,6 +214,6 @@ func Mount(boxID string) (alreadyMount bool, err error) {
|
|||
return false, nil
|
||||
}
|
||||
|
||||
func isUserGuide(boxID string) bool {
|
||||
func IsUserGuide(boxID string) bool {
|
||||
return "20210808180117-czj9bvb" == boxID || "20210808180117-6v0mkxr" == boxID || "20211226090932-5lcq56f" == boxID
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue