mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 23:20:13 +01:00
🔥 启动时移除处于网盘路径下的工作空间 https://github.com/siyuan-note/siyuan/issues/7790
This commit is contained in:
parent
25235bb952
commit
a31570c31c
1 changed files with 0 additions and 15 deletions
|
|
@ -207,7 +207,6 @@ func initWorkspaceDir(workspaceArg string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var workspacePaths []string
|
var workspacePaths []string
|
||||||
var cloudDrive bool // 启动时移除处于网盘路径下的工作空间 https://github.com/siyuan-note/siyuan/issues/7790
|
|
||||||
if !gulu.File.IsExist(workspaceConf) {
|
if !gulu.File.IsExist(workspaceConf) {
|
||||||
WorkspaceDir = defaultWorkspaceDir
|
WorkspaceDir = defaultWorkspaceDir
|
||||||
if "" != workspaceArg {
|
if "" != workspaceArg {
|
||||||
|
|
@ -215,16 +214,6 @@ func initWorkspaceDir(workspaceArg string) {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
workspacePaths, _ = ReadWorkspacePaths()
|
workspacePaths, _ = ReadWorkspacePaths()
|
||||||
var tmp []string
|
|
||||||
for _, workspacePath := range workspacePaths {
|
|
||||||
if IsCloudDrivePath(workspacePath) {
|
|
||||||
logging.LogWarnf("skip the cloud drive path [%s]", workspacePath)
|
|
||||||
cloudDrive = true
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
tmp = append(tmp, workspacePath)
|
|
||||||
}
|
|
||||||
workspacePaths = tmp
|
|
||||||
|
|
||||||
if 0 < len(workspacePaths) {
|
if 0 < len(workspacePaths) {
|
||||||
// 取最后一个(也就是最近打开的)工作空间
|
// 取最后一个(也就是最近打开的)工作空间
|
||||||
|
|
@ -249,10 +238,6 @@ func initWorkspaceDir(workspaceArg string) {
|
||||||
os.Exit(logging.ExitCodeInitWorkspaceErr)
|
os.Exit(logging.ExitCodeInitWorkspaceErr)
|
||||||
}
|
}
|
||||||
|
|
||||||
if cloudDrive {
|
|
||||||
os.Exit(logging.ExitCodeFileSysErr)
|
|
||||||
}
|
|
||||||
|
|
||||||
ConfDir = filepath.Join(WorkspaceDir, "conf")
|
ConfDir = filepath.Join(WorkspaceDir, "conf")
|
||||||
DataDir = filepath.Join(WorkspaceDir, "data")
|
DataDir = filepath.Join(WorkspaceDir, "data")
|
||||||
RepoDir = filepath.Join(WorkspaceDir, "repo")
|
RepoDir = filepath.Join(WorkspaceDir, "repo")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue