From 26b25b8f385a7b0bd6d6c27c948839c151ee854b Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Mon, 27 Mar 2023 11:49:28 +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 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/kernel/util/working.go b/kernel/util/working.go index 770ff5561..7fb9014a3 100644 --- a/kernel/util/working.go +++ b/kernel/util/working.go @@ -214,6 +214,16 @@ func initWorkspaceDir(workspaceArg string) { } } else { workspacePaths, _ = ReadWorkspacePaths() + var tmp []string + for _, workspacePath := range workspacePaths { + if IsCloudDrivePath(workspacePath) { + logging.LogWarnf("skip the cloud drive path [%s]", workspacePath) + continue + } + tmp = append(tmp, workspacePath) + } + workspacePaths = tmp + if 0 < len(workspacePaths) { // 取最后一个(也就是最近打开的)工作空间 WorkspaceDir = workspacePaths[len(workspacePaths)-1]