🎨 更新版本后自动打开用户指南 Fix https://github.com/siyuan-note/siyuan/issues/7469

This commit is contained in:
Liang Ding 2023-02-24 12:49:49 +08:00
parent 1069d245af
commit 0b7598df3b
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
6 changed files with 8 additions and 10 deletions

View file

@ -180,15 +180,12 @@ var (
SnippetsPath string // 数据目录下的 snippets/ 路径
UIProcessIDs = sync.Map{} // UI 进程 ID
IsNewbie bool // 是否是第一次安装
)
func initWorkspaceDir(workspaceArg string) {
userHomeConfDir := filepath.Join(HomeDir, ".config", "siyuan")
workspaceConf := filepath.Join(userHomeConfDir, "workspace.json")
if !gulu.File.IsExist(workspaceConf) {
IsNewbie = ContainerStd == Container // 只有桌面端需要设置新手标识,前端自动挂载帮助文档
if err := os.MkdirAll(userHomeConfDir, 0755); nil != err && !os.IsExist(err) {
log.Printf("create user home conf folder [%s] failed: %s", userHomeConfDir, err)
os.Exit(ExitCodeCreateConfDirErr)