🎨 Change the initial workspace path to ~/Library/Application Support/SiYuan on macOS https://github.com/siyuan-note/siyuan/issues/17095

Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2026-02-24 17:59:20 +08:00
parent 733725fd56
commit bcc9886518
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -437,7 +437,11 @@
const path = require('path')
const fs = require('fs')
const defaultWorkspace = path.join(decodeURIComponent(getSearch('home')), "SiYuan")
let defaultWorkspace = path.join(decodeURIComponent(getSearch('home')), "SiYuan")
if ("darwin" === process.platform) {
// Change the initial workspace path to ~/Library/Application Support/SiYuan on macOS https://github.com/siyuan-note/siyuan/issues/17095
defaultWorkspace = path.join(decodeURIComponent(getSearch('home')), "Application Support", "SiYuan")
}
if (!fs.existsSync(defaultWorkspace)) {
fs.mkdirSync(defaultWorkspace, {mode: 0o755, recursive: true})
}