From b0cd23245c7de395a19754b17ad27dc3111a9d6c Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Sun, 12 Feb 2023 23:49:56 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E7=A7=BB=E5=8A=A8=E7=AB=AF=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E9=87=8D=E6=96=B0=E6=89=93=E5=BC=80=E5=B7=B2=E7=BB=8F?= =?UTF-8?q?=E7=A7=BB=E9=99=A4=E7=9A=84=E5=B7=A5=E4=BD=9C=E7=A9=BA=E9=97=B4?= =?UTF-8?q?=20https://github.com/siyuan-note/siyuan/issues/7353?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/api/workspace.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/kernel/api/workspace.go b/kernel/api/workspace.go index 4fa5b78df..ce6f82fbb 100644 --- a/kernel/api/workspace.go +++ b/kernel/api/workspace.go @@ -134,17 +134,18 @@ func getMobileWorkspaces(c *gin.Context) { return } - var names []string + var paths []string for _, dir := range dirs { if dir.IsDir() { - if isInvalidWorkspacePath(filepath.Join(root, dir.Name())) { + absPath := filepath.Join(root, dir.Name()) + if isInvalidWorkspacePath(absPath) { continue } - names = append(names, dir.Name()) + paths = append(paths, absPath) } } - ret.Data = names + ret.Data = paths } func getWorkspaces(c *gin.Context) {