Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

: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

Daniel07705b539720
diff --git a/kernel/util/working.go b/kernel/util/working.go
index 75c1efe071..2b08e03f60 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