This commit is contained in:
Liang Ding 2023-01-05 11:14:41 +08:00
parent 6b4a6bd7d3
commit ac03db15df
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
3 changed files with 65 additions and 14 deletions

View file

@ -199,6 +199,10 @@ func initWorkspaceDir(workspaceArg string) {
defaultWorkspaceDir = filepath.Join(userProfile, "Documents", "SiYuan")
}
}
if err := os.MkdirAll(defaultWorkspaceDir, 0755); nil != err && !os.IsExist(err) {
log.Printf("create default workspace folder [%s] failed: %s", defaultWorkspaceDir, err)
os.Exit(ExitCodeCreateWorkspaceDirErr)
}
var workspacePaths []string
if !gulu.File.IsExist(workspaceConf) {