Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Vanessa 2025-09-07 09:59:48 +08:00
commit 0fce405a05

View file

@ -203,6 +203,12 @@ func Mount(boxID string) (alreadyMount bool, err error) {
return
}
boxes, _ := ListNotebooks()
var sort int
if len(boxes) > 0 {
sort = boxes[0].Sort - 1
}
p := filepath.Join(util.WorkingDir, "guide", boxID)
if err = filelock.Copy(p, localPath); err != nil {
return
@ -218,6 +224,7 @@ func Mount(boxID string) (alreadyMount bool, err error) {
if box := Conf.Box(boxID); nil != box {
boxConf := box.GetConf()
boxConf.Closed = true
boxConf.Sort = sort
box.SaveConf(boxConf)
}