From a95757c84acacf1501b0d7780bd5c2c3d8067556 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Mon, 5 Sep 2022 21:48:53 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20Linux=20=E7=AB=AF=E4=B8=8D=E5=86=8D?= =?UTF-8?q?=E6=94=AF=E6=8C=81=20`=E7=B2=98=E8=B4=B4=E4=B8=BA=E7=BA=AF?= =?UTF-8?q?=E6=96=87=E6=9C=AC`=20=E6=97=B6=E5=A4=84=E7=90=86=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E7=BB=9D=E5=AF=B9=E8=B7=AF=E5=BE=84=20Fix=20https://g?= =?UTF-8?q?ithub.com/siyuan-note/siyuan/issues/5825?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/api/clipboard.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/kernel/api/clipboard.go b/kernel/api/clipboard.go index 62d6711e5..3aecdeae0 100644 --- a/kernel/api/clipboard.go +++ b/kernel/api/clipboard.go @@ -26,6 +26,12 @@ func readFilePaths(c *gin.Context) { ret := gulu.Ret.NewResult() defer c.JSON(200, ret) - paths, _ := clipboard.ReadFilePaths() + var paths []string + if !gulu.OS.IsLinux() { + paths, _ = clipboard.ReadFilePaths() + } + if 1 > len(paths) { + paths = []string{} + } ret.Data = paths }