mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 00:38:49 +01:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
26b6bd239c
1 changed files with 7 additions and 2 deletions
|
|
@ -349,8 +349,13 @@
|
|||
item.addEventListener('click', () => {
|
||||
const {dialog} = require('@electron/remote')
|
||||
const path = require('path')
|
||||
const fs = require('fs')
|
||||
const defaultWorkspace = path.join(decodeURIComponent(getSearch('home')), "SiYuan")
|
||||
if (!fs.existsSync(defaultWorkspace)) {
|
||||
fs.mkdirSync(defaultWorkspace, {mode: 0o755, recursive: true})
|
||||
}
|
||||
dialog.showOpenDialog({
|
||||
defaultPath: decodeURIComponent(getSearch('home')),
|
||||
defaultPath: defaultWorkspace,
|
||||
properties: ['openDirectory', 'createDirectory'],
|
||||
}).then((result) => {
|
||||
if (result.canceled) {
|
||||
|
|
@ -358,8 +363,8 @@
|
|||
}
|
||||
|
||||
const {ipcRenderer} = require('electron')
|
||||
const fs = require('fs')
|
||||
const initPath = result.filePaths[0]
|
||||
|
||||
if (isICloudPath(initPath)) {
|
||||
let msg = '⚠️ This folder is under the iCloud sync path, please change another path'
|
||||
if (isChinese(currentLang)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue