diff --git a/kernel/model/mount.go b/kernel/model/mount.go index 6955b58dc..6ac4df43a 100644 --- a/kernel/model/mount.go +++ b/kernel/model/mount.go @@ -256,10 +256,11 @@ func Mount(boxID string) (alreadyMount bool, err error) { boxConf.Closed = false box.SaveConf(boxConf) - box.Index() // 缓存根一级的文档树展开 - ListDocTree(box.ID, "/", util.SortModeUnassigned, false, false, Conf.FileTree.MaxListCount) - util.ClearPushProgress(100) + files, _, _ := ListDocTree(box.ID, "/", util.SortModeUnassigned, false, false, Conf.FileTree.MaxListCount) + if 0 < len(files) { + box.Index() + } if reMountGuide { return true, nil