🎨 改进 Windows 端默认工作空间路径 Fix https://github.com/siyuan-note/siyuan/issues/5622
This commit is contained in:
parent
3cd594c94c
commit
0a9987726a
1 changed files with 7 additions and 0 deletions
|
@ -194,6 +194,13 @@ func initWorkspaceDir(workspaceArg string) {
|
|||
}
|
||||
|
||||
defaultWorkspaceDir := filepath.Join(HomeDir, "Documents", "SiYuan")
|
||||
if gulu.OS.IsWindows() {
|
||||
// 改进 Windows 端默认工作空间路径 https://github.com/siyuan-note/siyuan/issues/5622
|
||||
if userProfile := os.Getenv("USERPROFILE"); "" != userProfile {
|
||||
defaultWorkspaceDir = filepath.Join(userProfile, "Documents", "SiYuan")
|
||||
}
|
||||
}
|
||||
|
||||
var workspacePaths []string
|
||||
if !gulu.File.IsExist(workspaceConf) {
|
||||
WorkspaceDir = defaultWorkspaceDir
|
||||
|
|
Loading…
Add table
Reference in a new issue