From 07705b5397207ff1d594bbdfd45eb576af763e24 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Wed, 8 Apr 2026 17:33:04 +0800 Subject: [PATCH] :art: Change the initial workspace path to ~/Library/Application Support/SiYuan on macOS https://github.com/siyuan-note/siyuan/issues/17095 :bug: Default workspace data will be lost on macOS https://github.com/siyuan-note/siyuan/issues/17430 Signed-off-by: Daniel <845765@qq.com> --- kernel/util/working.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel/util/working.go b/kernel/util/working.go index 75c1efe07..2b08e03f6 100644 --- a/kernel/util/working.go +++ b/kernel/util/working.go @@ -261,6 +261,9 @@ func initWorkspaceDir(workspaceArg string) { if userProfile := os.Getenv("USERPROFILE"); "" != userProfile { defaultWorkspaceDir = filepath.Join(userProfile, "SiYuan") } + } else if gulu.OS.IsDarwin() { + // Change the initial workspace path to ~/Library/Application Support/SiYuan on macOS https://github.com/siyuan-note/siyuan/issues/17095 + defaultWorkspaceDir = filepath.Join(userHomeConfDir, "Library", "Application Support", "SiYuan") } var workspacePaths []string