From b7b8ae998fbb7b2fbcd30e8b1650ab777f94d16d Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Mon, 27 Mar 2023 15:25:51 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E5=90=AF=E5=8A=A8=E6=97=B6=E7=A7=BB?= =?UTF-8?q?=E9=99=A4=E5=A4=84=E4=BA=8E=E7=BD=91=E7=9B=98=E8=B7=AF=E5=BE=84?= =?UTF-8?q?=E4=B8=8B=E7=9A=84=E5=B7=A5=E4=BD=9C=E7=A9=BA=E9=97=B4=20https:?= =?UTF-8?q?//github.com/siyuan-note/siyuan/issues/7790?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/util/working.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/kernel/util/working.go b/kernel/util/working.go index 380756004..005066824 100644 --- a/kernel/util/working.go +++ b/kernel/util/working.go @@ -207,6 +207,7 @@ func initWorkspaceDir(workspaceArg string) { } var workspacePaths []string + var cloudDrive bool // 启动时移除处于网盘路径下的工作空间 https://github.com/siyuan-note/siyuan/issues/7790 if !gulu.File.IsExist(workspaceConf) { WorkspaceDir = defaultWorkspaceDir if "" != workspaceArg { @@ -214,11 +215,11 @@ func initWorkspaceDir(workspaceArg string) { } } else { workspacePaths, _ = ReadWorkspacePaths() - // 启动时移除处于网盘路径下的工作空间 https://github.com/siyuan-note/siyuan/issues/7790 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) @@ -248,6 +249,10 @@ func initWorkspaceDir(workspaceArg string) { os.Exit(logging.ExitCodeInitWorkspaceErr) } + if cloudDrive { + os.Exit(logging.ExitCodeFileSysErr) + } + ConfDir = filepath.Join(WorkspaceDir, "conf") DataDir = filepath.Join(WorkspaceDir, "data") RepoDir = filepath.Join(WorkspaceDir, "repo")